Hi Bruce,
Ownership determines who is responsible for tracking the disposal of an instance. There are only two valid values for this and you have shown both of them in your examples.
OwnedByLifetimeScope - The instances are disposed when the lifetime scope is disposed.
ExternallyOwned - The lifetime scope does not dispose the instances.
The ExternallyOwned option means that when the service was registered the disposal tracking feature was explicitly turned off.
builder.RegisterType<SomeComponent>().ExternallyOwned();
When the disposal tracking is in place any service that implements IDisposable will be disposed when the lifetime scope that manages it is disposed.
You can read a bit more about disposal tracking in the documentation.
Hope that provides some help in resolving your issue.
Cheers,
Alex.