It’s already fixed, but didn’t make it to the 28.0.4 release, see [stable28] fix(JSRecourceLocator): Add missing slash after server root by backportbot[bot] · Pull Request #44413 · nextcloud/server · GitHub
You should be able to manually apply the PR though: Patching Nextcloud — Nextcloud latest Administration Manual latest documentation