Then invading Ukraine wouldn't make Russia getting more borders with more NATO members whose now would be very angry about russia and will do whatever they could to make things difficult?
Yes, but it wouldn't be Russian territory would it? Despite all of Putin's talk about Ukraine being Russian (bullshit by the way even if some Eastern portions seem to be more pro-Russia the Ukraine's west), I doubt Putin would make it formally part of Russia. But even if he did, the new NATO-Russia border would be further West.