How can I dynamically change the NetDriver?

I can create P2P matches using EOSCore. However, when players are on same host that cause problem to connect. I made a test with changing/commenting +NetDriverDefinitions=…

Changing it before using a standalone game make it possible to connect two players on same host or I got this result for editor standalone games.

What is the way I do it without manually modifying the defaultengine.ini file?