Right now, I have the same problem. I enabled allow "Allow panel access via IPv6 address". My aaPanel Internet Address has a link of ipv6 address. I cannot enter aapanel login website. With the answered code above, I can disable aapanel ipv6 access and return the aaPanel Internet Address to IPv4 version website url login link.
This support topic helps me. Thank you very much.