Is there any way to have both?

I have built an arcade table and I put an extension socket on the side to extend one of the USB sockets and the 3.5mm audio.

I would like to run the sound through HDMI to the speakers in the monitor but have the ability to plug in external speakers to my extension socket.

I tried extending from the headphone socket on the TV but it stops the sound from the inbuilt speakers and when plugged o to the Pi I get nothing.

The guide above is great and allows me to switch but would like both to work simultaneously.