Maybe Code is overriding Files' association to open folders (inode/directory)?
Yes, that is the case. Both have an association with inode/directory in their .desktop file. Somehow Code's association gets priority (my guess is either it goes to the most recently updated application or the one with the name in the earliest alphanumerical order).
This can be ...
Type in terminal command:
to shows the exact names of displays
This one shows VGA (15-pin blue connector), HDMI, Display Port and LVDS (laptop screen):
xrandr -q | grep 'VGA\|HDMI\|DP\|LVDS'
This is a sample command to turn off LVDS-1 and enable VGA-1:
xrandr --output LVDS-1 --off --output VGA-1 --auto
To switch back:
xrandr --output VGA-1 --...