Using optical out for box but ARC for other devices

Realise this might be a far fetched question.

I want to get dolby digital from my wetek play 2 box, so I’ve plugged an optical out directly from my box to the Samsung home theatre. All good there.

Now I have set the sound on Samsung to auto. Unfortunately, it always picks up the box and feeds through the ARC rather than optical. Unfortunately my TV doesn’t do pass through otherwise none of this would be a problem.

Can someone suggest what I could do other than manually forcing the home theatre to optical. I want to be able to seamlessly use both. Perhaps something in CEC ?