Based on the videos, I assumed you are playing in full screen mode Does the issue also occur when you are playing in windowed mode of Royals?
Can't think of any other reasons why having a prompt pop-up will disconnect Will update here if I see any other relevant threads or possible solutions This thread might be related (seems similar) https://royals.ms/forum/threads/dc-issues-during-apq.202036/