It's not that I want to cache the instance, the problem is that if I don't do that many different registries are created.
If you remove this, during the test this registry is created several times and when I try to obtain it to get a service it always returns the wrong registry without the service.

This was unexpected and in the end I didn't understand why it is happening.