Edit: perhaps the commercial case could be limited to sharing a copy with a consultant, having them do the repair job, give you back the code and then delete their copy.
For service as a software substitute (SaaSS), I guess if you should have the right to extract your data too.
Most commercial software is rented, not owned. Your iPhone's hardware is yours, but the iOS it runs is Apple's, and whatever runs in the baseband processor may belong to some third parties like Qualcomm.
But if you own a copy of software, you usually can patch it to your heart's content. Selling patched copies may be a different deal. (Of course, easy with open source.)
Seems there was also some movement on this in France in 2019[2], though a french ruling I don't see why the same implementation wouldn't be applicable to all EU states based on the above.
[1]https://en.wikipedia.org/wiki/Software_license#Ownership_vs.... [2]https://www.engadget.com/2019-09-19-french-court-valve-steam...