I’d try to install qpwgraph and see if anything changes when you plug in/unplug the headphones. If not, that means the switching is done by the firmware or the driver itself and not exposed to the OS, so you won’t be able to change it.
If you do see change, it’ll help you find a solution.