That is what’s happening.
SpaceX knows which satellites were sold to the Ukrainian government though and could apply additional filtering. That’s the easiest first step.
To prevent Ukrainian dishes from falling into Russian hands you’d also need some sort of rolling authentication code so the dish becomes inoperable after a period of time.
Simply being in Russian territory doesn’t guarantee a Russian is using it as it could be Ukrainian special forces deep in enemy territory.
You probably can’t easily at the front lines. But you probably could past a threshold?