We’re not discussing the local language, we’re discussing the English language.
If you add the type of government, then you use the. Mexico alone doesn’t use it, much like Ukraine doesn’t specify the type of government so it’s omitted.
I'm not sure plurality is the distinguishing feature, since you have The United Kingdom, The Czech Republic, and The Gambia. But none of that really matters; if the country says it doesn't use the definite article, it seems pretty straightforward to not do so.
Those are modified by kingdom and republic. There are many kingdoms and republics, which is why you identify it with “the”. That’s not what’s happening with Ukraine.
The Gambia is an edge case, as it’s requested by its government. From Wikipedia:
“The Gambia is one of a very small number of countries for which the definite article is commonly used in its English-language name, other than cases in which the name is plural (the Netherlands, the Philippines) or includes the form of government (the United Kingdom, the Czech Republic).“
Interestingly, in many languages you often would, but it depends on the specific country. Both French and Portuguese use the definite article for most countries but not all.
If I were speaking French or Portuguese, I would definitely say "the Mexico" (le Mexique, o México), "the Brazil" (le Brésil, o Brasil), and "the France" (la France, a França).
English has some traditions of using definite articles for singular proper geographic names. People have found some patterns in this, but my impression is that it's something that can be quite irregular in individual languages, and not consistent between languages, either.
The use "the Ukraine" sounds natural to me as a middle-aged native English speaker; my impression is that "Ukraine" has replaced "the Ukraine" in most references only because of the request of the Ukrainian government, and not because of any grammatical concern with proper names using definite articles.
But it's definitely possible that there is a pattern in which geographic features other than countries more likely to bear the definite article in English, while countries are less likely to bear it, and if there were such a pattern, we might be unconsciously aware of it and not be able to articulate it easily, much like many other patterns in language.
So I would encourage people not to say that it's illogical to use definite articles with proper names, including geographic names -- it can be traditional and even obligatory in English and many other languages! -- but also not to say that it's obvious that there are never any possible connotations to be drawn from such use in English (that governments might want to avoid, as some people are saying has happened here).
Alone “Mexico”, “France”, or “America” don’t get a “the” because grammatically it isn’t appropriate.
Ukraine can because the word in local language has a common meaning, something like “borderlands” so it does work, but they ask nicely that you don’t.