It would definitely be to Russia's advantage to sell gas at the Ukrainian border and let the Europeans deal with the transit. The problem is that the current situation is not driven by Russia's interests, but by those of a select few Russian and Ukrainian oligarchs who benefit from that situation - capturing a lot of money, mostly from Gazprom, but also from Ukrainian central authorities. In the long run, we're all dead. John Maynard Keynes
If there is no gas supply how they (anyone) can benefit?
They can make money all year round on supplies to the privatised, cash-paid part of the Ukraine market. The wars are about sharing the spoils: who gets how much?
As to "letting the Europeans deal with it", that would mean EU monitors checking that no gas gets "lost" during transit.