Use only internal display
This needs to be configured on your external display and not on the connected device (Mac, PC or anything else).
Make sure your external display is set to not switch to a different source automatically.