this is generally caused by unmanned code. typically classes that access unmanned code or memory implement Dispose().
you will want to learn to do heap analysis. the tools will depend on the runtime version:
https://learn.microsoft.com/en-us/dotnet/core/diagnostics/sos-debugging-extension