It's important to note that the dissolution of the Polish communist party in 1938 was not a decision made solely by Stalin, but rather a decision made by the Comintern (Communist International), of which Stalin was a key member.
To understand the context for this decision, it's necessary to consider the geopolitical situation in Europe at the time. In the 1930s, the Soviet Union was seeking to solidify its influence in Eastern Europe, particularly in countries with significant communist movements, such as Poland. However, the communist party in Poland was divided, with some members advocating for a more militant approach and others advocating for a more moderate approach.
Stalin and the Comintern saw the divisions within the Polish communist party as a hindrance to their efforts to establish Soviet influence in the region, and they therefore dissolved the party in 1938 in order to create a new, unified party that would be more amenable to Soviet control. This new party, known as the Communist Party of Poland (KPP), was established in 1948 and was closely aligned with the Soviet Union.
It's worth noting that this decision was not without controversy within the communist movement, and it was seen by some as a betrayal of the ideals of international solidarity and self-determination. However, from Stalin's perspective, the dissolution of the Polish communist party was a necessary step in furthering Soviet interests in the region.