"Could not establish connection. Receiving end does not exist" only on Firefox for Android

I’ve updated my extension to manifest v3 and a non persistent background page and it works fine on Firefox on desktop but I’m getting errors when trying to communicate between my content script and the background page on Firefox for Android. The same code works as expected on desktop.

I register the listener in the main javascript file for my background page

// Expose the UI settings to the content script
let getAllUISettings = async () => {
    try {
        const { centerImages, realSizeImages, showBackgroundImages } = await settings.getMultipleKeyValues(
            ['centerImages', 'realSizeImages', 'showBackgroundImages']
        )
        return {
            uiSettings: true,
            centerImages: centerImages,
            realSizeImages: realSizeImages,
            showBackgroundImages: showBackgroundImages
        }
    } catch (error) {
        console.error('Failed to get UI settings', error)
    }
    return true
}
browser.runtime.onMessage.addListener((data, sender) => {
    // From MDN: If you only want the listener to respond to messages of a
    // certain type, you must define the listener as a non-async function,
    // and return a Promise only for the messages the listener is meant to
    // respond to and otherwise return false or undefined:
    if (data.getAllUISettings === true) {
        return getAllUISettings()
    } else {
        return false;
    }
})

then call it during the execution of my content script like so

    // now apply user defaults
    // these must be last because the fetching from local storage
    // and port communication is async
    browser.runtime.sendMessage({getAllUISettings: true})
        .then((response) => {
            if (response.uiSettings) {
                if (response.centerImages) {
                    toggleCenter()
                    ui.center.checkbox.setAttribute('checked', 'true')
                } else {
                    ui.center.checkbox.removeAttribute('checked')
                }
                if (response.realSizeImages) {
                    toggleSize()
                    ui.size.checkbox.setAttribute('checked', 'true')
                } else {
                    ui.size.checkbox.removeAttribute('checked')
                }
                if (response.showBackgroundImages) {
                    ui.background.checkbox.setAttribute('checked', 'true')
                } else {
                    toggleShowBackground()
                    ui.background.checkbox.removeAttribute('checked')
                }
            }
        })
        .catch((error) => {
            console.error('Error getting UI settings', error)
        })

On desktop this fetches the values from local storage, sends them back to the content script and everything works, but it’s as if the background script doesn’t get resumed to respond to the message on Android?

Error getting UI settings Error: Could not establish connection. Receiving end does not exist.
run moz-extension://721d7c9d-d0c0-44a2-ab97-78b1a8913730/src/content-script.js:269

Full code is at https://github.com/Skeletonxf/image-extract/tree/v2-prerelease