there is a problem in installing nextcloud via CLI (Installing NC 11.0.0 from scratch problem) and or using NC11 under certain circumstances.
this looks like a core-issue to me and i believe there’s nothing you can do atm except using NC 10.x.
but as always, i could be wrong, remember that.