You do need to be careful with the splitter you use, which HDMI input, and what kind of HDMI cable you use. I thought there was something wrong with my PS5 for several months because my TV would randomly turn off then turn back on. It was highly frustrating, but then I realized the cable I was using was not truly HDMI 2.1. Once I changed that and made sure I was going into the HDMI 2.1 input on the TV, I've never once had the issue again.
I use this one for my PS5, Xbox Series X, and Switch. I don't have any issues:
https://www.amazon.com/gp/product/B0B8J5T3B3/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1