For the export of weapons from the country, you need a permit from the Ministry of Internal Affairs, for import into another country - a permit from a similar government agency of that country. So if a military or police officer needs to fly somewhere with a weapon, his superiors first draw up paperwork.
Further, if he flies somewhere on a regular civil flight, he puts the weapon in a hard case, declares it at the airport of departure and hands it over to the security service. Those give it directly to the crew of the plane. Upon arrival, the owner of the weapon receives it back and declares it at customs.
The military is forbidden to travel abroad on vacation, so the question of weapons does not concern them. If they go abroad as a result of some kind of military operation, then the service weapon remains with them. For employees of the Ministry of Internal Affairs, there is an order on the undesirability of travel abroad for police officers. In some countries, security officials can still rest. For example, in Vietnam, Tunisia, the Maldives, China, Cambodia, the United Arab Emirates, etc. Well, the Interior Ministry officers will not take weapons with them abroad, because they are not supposed to, and they do not need to.