Any project written in a language with big user base java, C#, C++, perl, rust even fortran has this problem. The only thing that helps is experience with the language. I very seldom see code that survives ten years, even no deps things fail because your compiler interpreter changes.
It is just part of the job. Sure I am not a big fan of C# or PowerShell but a big part is just that I have no experience.
That’s not generally true for .Net, though the use of third party libraries could create an issue in some cases.
.Net was designed deliberately so that multiple versions could be installed side by side and an executable would pick the version most likely to work based on target version and compatibility. In most cases .Net is also forward
compatible so e.g. a .Net 3 app continues to work on a PC where only .Net 4.8 is installed. In addition, libraries could be part of the application installation and in modern .Net, the framework can be part of the application installation.
In most cases, everything will just work, and when it doesn’t, one can just install the older .Net version needed and nothing will be broken.
What I mean with "no experience" is that I have never fixed issues with them myself. The amount of hours we were billed internally for fixing a broken .Net app tells me it was not that easy though.
My point is that if you do not know your platform things get complicated, either for yourself or for people that take over after you. For me personally python does not mark it self as extra hard to handle.
I have never been a Python fan, but I wrote my first python application in Zope 26 years ago it still runs. Since then I have touched other things that are much worse not all of them on the list above. My point is that while python may break, other stuff breaks as well.
There are a lot of prototype integration projects in Python though and that is incredibly hard to get running. I know nothing about C# but as Linus Torvalds said the binary compatibility layer for Linux is Win32 because of Steam, so MS has worked on the problem before. Though I would like to point out that when you are talking about prototype integration projects Windows is as bad as Python, I have rebuilt test environment in Windows that had been left to rot for ten years.
So in my work life experience all programming languages suck at this, python might suck less or more but it is more of a skill issues than anything.
It is just part of the job. Sure I am not a big fan of C# or PowerShell but a big part is just that I have no experience.