There is nothing in the Sonos software that changes volume, so as a guess, it’s either the TV remote, or something else that is affecting the volume.
Since it is a Ray, it is connected via optical, which means it can’t be getting commands directly from the TV set, the way a CEC connected device could, but the remote is a possibility, as is the optical signal being generated by the TV set. Which TV do you have? Is the audio setting on that TV set to ‘Fixed’, rather than ‘Variable’? Which remote is associated with your system?
Have you called Sonos Support directly to discuss it?
When you speak directly to the phone folks, they have tools at their disposal that will allow them to give you advice specific to your network and Sonos system.