I believe nested withScopes work like closures and a new cloned scope is added to the stack with every call. Would this still work when calling it with async functions? Eg:
Sentry.withScope(async (scope) => {
scope.setExtra('key', 'value');
await someNetworkRequest();
Sentry.withScope(async (scope2) => {
... scope2 here would still have previous key/value;
});
});