After trying a few days to get it working unsuccessfully, I decided to connect the TV directly to the gateway and assign it to an appropriate VLAN in a couple of minutes, and everything is like I want it to be now.
I guess it was too difficult for me on the switch.
Thanks to all who tried to help!