Use new method https://github.com/electron/electron/blob/main/docs/api/web-utils.md#webutilsgetpathforfilefile
// Before
const oldPath = document.querySelector('input').files[0].path
// After
const { webUtils } = require('electron')
const newPath = webUtils.getPathForFile(document.querySelector('input').files[0])