Yeah, I understand it's a concern that the virus might continue spreading by that action, but if I felt like my life was on the line (eg: not going on a random vacation), I think I'd do the same thing, even if I had COVID.
Ukraine in a normal state: Yes, don't fly anywhere if you have COVID.
Ukraine while being invaded by another country: Yeah, lets get you out of there. If you have COVID we'll work around it somehow, as we want to save lives, which is the whole point behind COVID restrictions in the first place.