You treat an attack very differently.
If Poland let the refugees in, I expect Belarus would pull more stunts like this. It was no good for anyone.
There is some mild tension with Ukrainians coming to Poland as low-cost labor, but at the end of the day, it's the same culture. Or at least it was before Poland started to Westernize its culture. Honestly, I think the right solution here is to reform the Polish-Lithuanian Commonwealth. Poland, Lithuania, and Ukraine really ought to be one country. If Latvia, Estonia, Slovakia, or Moldova want to join in, the more the merrier. Belarus and Russia, when they're ready.
Estonia, by the way, is the odd man out. It has the least cultural or ethnic connection; much less than you'd expect. But I think it'd be a happy marriage. It's a compatible kind of diversity, where each side brings something complementary rather than conflicting and both sides benefit.