I have fixed it by setting the parameter enableRemoteConsent to TRUE which is FALSE by default.
According to the official iubenda document, In particular, if you set this parameter (enableRemoteConsent) to true, our solution creates a technical cookie on iubenda.com (domain) which is used when the cookie on the local domain is not found.
This was needed because in iubenda's javascript library, they are fetching domain name to save cookie using getCookieLocalDomain function which has the issue with country-based TLDs and only "co.uk" is handled. I faced the issue because my domain suffix is "com.au".
s.prototype.getCookieLocalDomain = function() {
var e = null;
if (this.options.localConsentDomain) return "." + this.options.localConsentDomain;
if (e = location.hostname, "localhost" != e) {
var t = /^[0-9]+$/.test(e.split(":")[0].split(".").join(""));
return t || (e = this.stringEndsWith(e, "co.uk") ? e.split(".").reverse().slice(0, 3).reverse().join(".") : e.split(".").reverse().slice(0, 2).reverse().join(".")), "." + e
}
return ""