If you have multiple endpoints in a single process, you need to create separate DI containers for each endpoint. It appears in the code you’ve posted that they are sharing a container.
If you have multiple endpoints in a single process, you need to create separate DI containers for each endpoint. It appears in the code you’ve posted that they are sharing a container.