Android - Stop auto-selecting cellular network
Problem was that the settings made in the device by manual selection wouldn't stick
*#*#*4636#*#* and in Phone Info section → preferred network type choose the network type you would like to be always connected to.
As OP noted in their comment, the network selection made in settings was not sticking and the selection made in above menu did stick and prevent roaming (they chose LTE as preferred network)
There is a setting to "fix" your device to a given network:
Settings › More … › Mobile networks › Network operators:
By default, this is set to "automatic". But there's an option to "manually select". This will then scan for available networks, and let you chose one (obviously only possible with the desired network in reach). Having done that, whenever the chosen network is not available, you'd simply have "no network" – it wouldn't switch to any other operator, however strong his signal might be.
I've often used that in the past before going abroad if I wished a device to not "accidentally roaming" even for calls. That way my then provider couldn't fool me with costs for "twice redirected calls" (from home to roaming to mailbox-at-home-network): Manually selecting my home network before departing, the device found no suitable network in the target country :)