It looks like this is a relatively long standing issue -
crbug.com/1275989. However, as a result of your message I was able to dig in a bit and
locate the
specific CL that introduced the problem. You can star that issue to raise it's priority and follow along with progress. Since it is a web API (rather than an extension specific one) I don't believe there is a clear way to associate the selected tab MediaStream with a tabID (the later of which is an extension specific concept). You could open a feature request with the
WICG to start discussion around supporting it, but I think getting the above bug fixed is likely the best path forward.