As of this writing, there are thirty-three pages of posts dedicated to the topic on the Samsung Community forum. The situations vary, but everyone agrees: you need to be able to turn off the auto-switching. One users mentions firing up his computer, which is connected to his television (presumably as a second monitor), and having the signal switch over while his wife is watching TV. The Nintendo Switch is particularly an issue, because when it goes into sleep mode it sends a signal to the TV, which causes the TV to switch to its input.
So far Samsung support hasn't been able to help, because there is no actual solution on their end yet. It's been suggested that using an HDMI switcher addresses the issue but limiting the TV to only one HDMI signal, but it's an annoying workaround for an even more annoying issue.