Neither country expected the treaty to last, and the areas in Poland were largely areas annexed from Ukraine and Lithuania beforehand. Is your point that the Soviets expected the Nazis to stay non-hostile until the end of World War II or even beyond it? Not only would that have been stupid, we have evidence to the contrary, that neither country expected the treaty to last.
Neither country expected the treaty to last, and the areas in Poland were largely areas annexed from Ukraine and Lithuania beforehand. Is your point that the Soviets expected the Nazis to stay non-hostile until the end of World War II or even beyond it? Not only would that have been stupid, we have evidence to the contrary, that neither country expected the treaty to last.