I have the same issue.
As a workaround, I made a change in manifest from:
"background": {
"service_worker": "background.js"
}
to:
"background": {
"scripts": [ "background.js" ],
"type": "module"
}
and then it works. Every time.
Hope this helps.