This issue seems to occur if you have no ARM format binaries in the MacOS folder. I have found 2 solutions to this bug. One is to just include a ARM binary in the .app/Content/MacOS, even if it does nothing and is used by nothing. You can generate one by running echo 'int main() {return 0;}' | clang -x c -o empty-bin -, and verify it is arm64 by doing lipo -info empty-bin. The other, saner option is to add the following to your plist:
<key>LSArchitecturePriority</key>
<array>
<string>arm64</string>
</array>
The issue is, MacOS seems to be caching the rosetta flag somewhere outside of the usual places. If I findThe only improvement would be if someone finds a way to clear the flag, I'll update this post, but currently instead of changing the only fix I have is to change your CFBundleIdentifier in the plist.
If you get thatthe rosetta window appears even once, that bundleId will always bring up thatsummon the window.