For web request routes it does this so it makes sure the tenant is set before:
public function getTenantMiddleware(): array
{
return [
IdentifyTenant::class,
...$this->tenantMiddleware,
];
}
I can tell that it has something to do with the order in which the middlewares are executed. Looks like IdentifyTenant is executed after other tenant middlewares and this is why it fails.