I suppose that's why they developer liquid glass, if they make the screen unreadable it won't matter that the wrong application is focused.
I have the same problem for opening any text file in a text editor from a separate terminal emulator. If I have any other editor windows open, if I save and close that file, focus is not restored to my terminal application.
It should be noted that this isn't true focus stealing, which is when a new window (that you didn't ask for) pops up and suddenly grabs focus from what you're doing. This is just macOS' app-based rather than window-based GUI task switching behavior sucking like it has always sucked.
Focus stealing happens quite a lot on macOS.
It's even more infuriating when I want the focus but because it's on a different space MacOS bugs out and refuses to switch. Not to mention when I have an app set to all spaces and reboot and it's stuck on a single space. Nobody at Apple uses MacOS.