@Relaxed has already mentioned biometrics. I don't know what's the current practice in Ukraine, but assuming your wife has had a Ukrainian passport or other identity documents in the past, Ukrainian authorities may already have her fingerprints or facial images on file. Even if the raw fingerprints are not available, they may be stored in the form of a computer hash, which can confirm a match against future samples.
This is hypothetical, but if the entry point has equipment to check the biometrics of visitors, it is plausible that an alert would pop out. Remember, border guards have access to a database of Ukrainian citizens, so they can make searches. The "match" can be further confirmed by the fact that birth date, place of birth and surname are still the same in the "foreign" passport.
Some countries do not even allow dual citizenship. I understand that Ukraine doesn't, although changes to the law have been discussed recently. But they are still entitled to treat your wife as a Ukrainian citizen regardless.
Even countries like the US that allow dual citizenship still require their citizens to enter and leave the country with their US passport.
To sum up:
- border control can make a reasonable assumption that your wife is, or used to be a Ukrainian citizen
- your wife potentially has something to hide
- border guards are used to asking questions
- the first question they may ask is, why don't you use your Ukrainian passport in the first place? Why are you trying to pass as a foreign national? <--- THAT looks like a risky bet in my opinion.
If they suspect anything, they can pull her out of the line, search her belongings, ask more inconvenient questions until they are satisfied about her identity and history.
Lots of men are still evading military service in Ukraine, and the authorities are actively looking for those people. Now regarding women I have done a quick search:
There is no mobilisation of women in Ukraine, but women who have a
medical or pharmaceutical education and are fit for military service
for health reasons and age are required to register for military
service. They can be called up for military service only with their
consent.
Source
To be confirmed with official sources of course.