win.webContents.send() is not being received by ipcRenderer.on

I am creating a new window in another class like this.

const { app, BrowserWindow, ipcMain } = require('electron')

const isDev = require('electron-is-dev')

let privacyWindow = null

const privacyOptions = {

    width: 600,

    height: 600,

    resizable: false,

    webPreferences: {

      nodeIntegration: true

    },

    show: false

}

function createPrivacyWindow (privacyWindow) {

    

    privacyWindow = new BrowserWindow({

        width: 1200,

        height: 1200,

        show: false

    })

  

    privacyWindow.loadURL('https://google.com')

  

    privacyWindow.on('closed', () => {

        console.log("privacy close options")

    })

    privacyWindow.webContents.on('did-finish-load', () => {

        privacyWindow.show()

        privacyWindow.webContents.send('testing', "privacy window token")

    })

    if(isDev) privacyWindow.webContents.openDevTools()

  

}

and them im calling this in my main class using
require('./privacywindow')

Everything works fine, but my privacyWindow.webContents.send() is not getting picked up by my

ipcRenderer.on()

Any ideas?