Couldn't Ukraine put a halt to this incursion by placing explosives along the length of its natural gas transmission system? Yes, it would destroy Ukraine's economy, but it would harm Russia's very badly too: And I don't think Putin could risk it.
In fact, the Ukrainian president could---if overt hostilities break out---say that "if we lose above x percent of land or take more than y number of casualties or lose more than z planes we will detonate the explosives we have planted along the pipeline. Of course, we know these numbers—and have chosen them randomly subject to some constraints, but we are not telling you.” This would put the Russians into a very odd position strategically, since that pipeline is a big part of why they are doing this.
The fact that this plan is not being contemplated suggests to me that the Ukrainian authorities fear the economic harm that would come from losing the pipeline more than any Russian invasion.
Another idea, the US could threaten to blow up the pipeline. Nuclear retaliation for this is unlikely though it might generate a great deal of hostility in Ukraine. Most likely, Putin would have to fold.