How to make NetworkBehaviour act like a MonoBehaviour in Single Player Mode

I realize that gameobjects with a NetworkBehaviour and NetworkIdentity scripts get disabled if you don’t use a network manager, aka in a single player mode scene.

How do I workaround that behaviour?

I want my code to run on single player if it’s a localPlayer, without changing anything.

This seems to get asked frequently. The easiest solution is to just local host the game.