Spring boot keycloak multi tennancy

I have a scenario where we have one keycloak which will be used to login from multiple tenants … multiple different domains. We are using spring boot on backend with oauth spring security (spring-boot-starter-oauth2-resource-server) so no keycloak adapter but spring boot oauth

1.) ech tennant will have one domain login should be possible via different domains
2.) in the backend I have the option to setup one domain as keycloak.url … can mutitennancy even work if the tokens will be issued from different domains.

If i get the token from org1.domain.com and on backend I have for example main.domain.com I receive 401 when calling rest endpoints … I suppose it is becuse the token has different domain inside as issuer.

Is there any work around for this.