I recommend installing pgAdmin 4 version 9.1 or later, which includes improvements to the logic. With these updates, the Query Tool and PSQL tabs will now open in the same active workspace where the action is initiated.
We have introduced Workspace feature in pgAdmin 4 v9.0. So in Windows 11 the behaviour you saw was expected. Please check the solution mentioned in the #8429.