$root gets overwritten by shallowMount wrapper $root

I have a problem with Unit testing a Vue component.

I need to override the $root thats created by the shallowMount function.

I have a plugin component which is assigning its $roots data to its local data:

data() {
  return {
    noStoreNotifications: [],
    isHistoryOpen: false,
    pluginSettingWithoutStore: this.$root._pluginSetting.withoutStore,
    pluginSettingShowNotification: this.$root._pluginSetting.showHistory,
    pluginSettingMaxHistoryLength: this.$root._pluginSetting.maxHistoryLength,
    pluginSettingReverseHistory: this.$root._pluginSetting.reverseHistory,

Since this plugin is used in multiple repositories, with different components and use cases, I need to be able to access its wrapper to get some data from it.

The plugin works fine but the unit test for it is not working as I would expect, but it makes sense why its not working.

As I wrote, I need to access the components wrapper object through $root.
And normally I would use:

cosnt data = {
  mocks: {
    $root: {
      _eventHub: new Vue(),
      _notificationContainer: null,
      _pluginSetting: {},

within the initial mount of the component

const wrapper = shallowMount(Notifications, data);

However this doesnt work, because the shallowMount method creates a wrapper with its own unique $root, which overrides mine.

Is there a way to override its $root to my specification before the component gets created?