Just an update here. I'm able to confirm that currently this is how HubSpot manage errors. That said, may be your team can try exploring this option -https://errorception.com/docs/onerror to work around the problem.
Thank you for the article! But looks like this how HubSpot should implement it.
We use Rollbar library which is out control and it relies on window.onerror. It handles window.onerror correct way as described in article. But then HubSpot just overrides it.
We cannot delay and load HubSpot first and then Rollbar.
I'd like to assure you that our internal team is aware of this issue and is looking to push a fix for this. I'll keep you posted once there's an update.