Scoped storage is what breaks things in Android 11, it is indeed done by Googlehi,
definitely it can't be that Google will be breaking this feature
it's a very valid feature request along with many others (not file related) that ask to use a variable instead of a fixed literal value in various actions/constraints
the shell script you provided doesn't work and I tried to save it on a var it says install needs 2 argument.That would be great however, I think Google is breaking these kinds of features.
Try shell script action:
install /storage/emulated/0/Magisk-v23.0.apk
For opening other files, you can use Android intents and or the cat command in the shell script action