It maybe you've had just ridiculously bad luck with 2 faulty units in succession; you've tried 2 different sources, and cables and the same thing occurs. Have you tried a RCA digital coax to 3.5mm Jack cable instead of optical? Just a thought.
Again, maybe totally irrelevant, but I never power mine down apart from when I'm swapping out gear and cables.
I hope you finally receive a working unit, or get to the bottom of why this is happening; sounds incredibly frustrating. 😤