Backend Code only runs in Preview

Thank you for the response. I’ll try my best to add some more detail.

It stopped working in Live a few months ago - the only error visible in browser console is HTTP/3 400 Bad Request during Live. The code still runs as expected in Preview mode.
I thought permission might be the problem as in Live mode there is never a response and it seems the backend call is never made. The console log line shows the json response - which works correctly in preview mode.

The code is run from a Dashboard page (on button click) that passes an iso2 country code to a backend function which then provides a json response. The button click event actually queries a (read-only) dataset and then steps through each result to pass the ios2 country code to the backend function. It then compares the returned result with the current value and if required updates it. Super simple.

The backend module permissions is set to Anyone:

The front-end page (I’ve cut out non relevant lines):

import wixData from 'wix-data';
import {getAdvisoryLevel} from 'backend/traveladvisory';

export async function buttonFetch_click(event) {   
    let counter = $w("#datasetAllCountries").getTotalCount();     
    var results = await $w("#datasetAllCountries").getItems(0, counter);
    for (let i= 0 ; i < counter ; i++) {
        var advisoryLevel = results.items[i].travelAdvisory;
        var countryIso = results.items[i].isoCode;
        var countryId = results.items[i].countryName;
        await getAdvisoryLevel (countryIso)
            .then(myData => { 
                console.log(myData['data']);
                if (myData['data'][countryIso]) {
                    levelData = myData['data'][countryIso]['advisory']['score'];
                } else {                   
                    levelData = advisoryLevel;
                    }   
            });       
        if (advisoryLevel !== levelData ) {
            await updateAdvisoryLevel(countryIso, levelData)
        }           
    }      
} 

The backend file:

// Filename: backend/traveladvisory.jsw (web modules need to have a .jsw extension)
import {fetch} from 'wix-fetch';

export function getAdvisoryLevel(country) {
  const url = 'https://www.travel-advisory.info/api?countrycode=';
      
  let fullUrl = url + country; 
   
  return fetch(fullUrl, {method: 'get'})
    .then(response => {
          //if (response.ok) {
              return response.json();
         // } 
      });  

}