All the countries of central and eastern Europe have seen changing borders along with shifting power politics. Most have ceased to exist as independent nations for a time.
The desire for independent nationhood remained.
Polish people were still Polish; Ukrainians still Ukrainian