When Soviets crossed Polish borders in 1939, the Polish statehood was exactly in the same defunct state as the Soviet in 1919-21.
Soviet Union decided to attack, it lost the war, it had to ceede territory.