Hello,
I checked it with Discourse Connect and works as expected for me. The modal not appears after I logged in. Can you share your guest gate settings (screenshot) and your website url (here or PM) to I can check this?
If you use Discourse Connect you have to disable custom url enabled
checkbox. Because it will first try to redirect to the custom urls after clicking the Guest Gate modal login / register button. If you leave this checkbox unchecked than the buttons will use the Discourse Connect url.