It would appear that your modem is not keeping your computers on a static IP address for your LAN. Therefore windows ends up using the wrong IP address/computer name to resolve the connection.
Most modem/routers keep a static IP to computer name or MAC address table so that whenever a particular MAC address/computer name disconnects and reconnects it always receives the same IP address on the Local Area Network. Unfortunately, that is not always the case. It depends on the specific modem/routers setup.
What worked for me was getting into my modem/routers settings page and making sure it kept a static IP address for each computer. To get to the modem/routers setup page you have to be connected to the router and enter a specific IP address. It varies by manufacturer. Look up your model's info on the manufacturer's website. Some modem/routers will have a sticker with the info attached to the unit, itself.
Once you get the IP addresses for your computers on your LAN to stop bouncing around and use Pauli O's tips for setting up a Table in hosts (which you have already done), you should get solid Network connections on your LAN. Anyway, that's what worked for me. Currently running Win10 1803 build 17134.112. Oh yeah, you probably have to reboot all computers and the modem/router once you get the settings changed.
Crazy that regular users have to try all these settings and adjustments just to get home networking running.
Good luck. Let us know how things work out.