Hi Lilith,
Game Pass Premium includes online console multiplayer, and this benefit should be shared with anyone using the subscriber’s Home Xbox.
Ask your friend to confirm on your console: Settings → General → Personalization → My home Xbox → “Make this my home Xbox.” Then sign your friend’s account out, restart the console, and launch the game using only your account. Also confirm the Premium subscription is active.
If the prompt remains, remove and re-add your profile, then check Xbox privacy settings to ensure multiplayer is allowed. Please note that Home Xbox sharing works on Xbox consoles, not on Windows PCs, and some game-specific add-ons or third-party account benefits are not shareable.
Thank you, and feel free to respond back for more assistance.