Just use subdomains such as *.dev.example.com, *.test.example.com, *.prod.example.com, etc., no?
And if your marketing/SEO/business people are ok with having something like "prod" as a subdomain for all your production web pages.
We then have app-stg and app-canary subdomains for our test envs which can only be accessed by us (enforced via zero trust). No reason for marketing or SEO teams to care in any case.