PN-6992: Widget-Modality.js has been updated to keep the correct bean co...

PN-6992: Widget-Modality.js has been updated to keep the correct bean count of open modals accross multiple sandboxes, instead of just its own. The UI reflects this design, but the internal bean counting mechanisms where not implemented correctly to reflect the single use of an overlay, regardless of sandbox. This commit addresses the issue.