According to the documentation (Change notice: Sandboxing of Connect App iframes), the sandboxed iframe should include “allow-top-navigation-by-user-activation” in the allow list.
I have created a Custom UI macro for Confluence, but the generated sandboxed iframe does not include the “allow-top-navigation-by-user-activation” option. The list includes only these: