Can’t really blame the outcome of this. Even without the high energy prices, Europe has been buying products outside of the EU for decades. Also in terms of software, so many companies and universities run to the Google/Amazon/Microsoft cloud solutions. All those self-hosted open-source solutions may not be able to keep up due to the limited cash flow. While many of those projects are based in Europe, such as Nextcloud, Jitsi and many others. Many industries died out or will die out due to this.
And yes, this behavior is due to the short term rewards. Just like regular consumers buy their stuff by just looking at how much it costs in terms of money. Not in terms of environmental and/or social damage. So it’s no wonder we have this outcome. I live in Europe, so of course I have a stake in keeping live as good as possible here. So I hope Europe will become more independent. But the ultimate goal is of course to open-source everything if we can remove the proprietary incentive in this market system.