Unfortunately, the error still occurs in Nextcloud 26.0.4 and Nextcloud 27.0.1.
If I understand it correctly, the solution to this problem is postponed to Nextcloud 28.
https://github.com/nextcloud/server/pull/37959#pullrequestreview-1406699312
Anyway, with the fix from @anon78853765’s post it works very well for me.