Anyone have an idea on what basis to limit the connection only to operators that I have in the package?
That's usually done by SIM operator ... which should reject registration of your SIM to roaming network if that's not allowed (HLR/HSS rejects registration and roaming network rejects terminal with "network forbidden" or "location area forbidden"). The terminal should detect that and stop trying to register to forbidden network.
A different problem is when the terminal is close to MNO's border of coverage and you don't want to roam into another network (if the terminal is stationary, then signal fluctuations are interim and it's probably fine to keep using old network if short connection outages can be tolerated). In this case terminals usually offer possibility to lock to network (MCC+MNC) ... but only to single one, it is not possible to construct a short list of allowed networks.
I don't know AT commands to execute network lock though.