Locking the group is a great suggestion but you need to remember to do that for every project you open on VSCode. An alternative quick shortcut I use is
Ctrl+Alt+Left/Right
to move the opened file between groups. You can change the binding from Preferences: Open Keyboard Shortcuts
as shown here