I can to start, but if it loses the connection the devices will roam onto any available network.
There's generally an "automatic" or "manual" option. Ensure it's set to Manual and select a network. For example, on the iPhone you can either choose the carrier automatically or select one manually. If you do the latter, it'll always look for that one until you tell it to pick another.
If your phone winds up picking another network when you regain service, then it's either something to do with the specific phone model or it's T-mobile's SIM not letting you lock on to one specific carrier.