FunctionNotFoundError - when accessing the same page a second time

Hello,
I have the following scenario and unfortunately am not able to reproduce when debugging. The issue only happens on my live site. It does not appear to matter which browser I use (tried Firefox and Chrome)

  1. Member logs in to the site.

  2. Member clicks on a member page called “Manage Subscription Plan” - this initiates a backend function to check the member status. Depending on the status I take certain actions. This works without issue.

  3. Member clicks on Profile or any other Page. Site goes to the new page without issue

  4. Member clicks on the same page as step 2 “Manage Subscription Plan” - site throws the following message: FunctionNotFoundError: Error loading function from web module backend/subscriptionMangement.jsw: function ‘subscriptionStatus’ not found
    In theory it should be accessing the same code path as in step 2. I know I have something wrong on my end as it is not doing that, but am not sure what I am doing wrong. I have included a snippet from the code that is having the issue. I have placed console.log messages in the code and can confirm that in step 2 above I am reaching backend/subscriptionMangement.jsw and executing function subscriptionStatus. However, in step 4 I never reach the backend. When the call is made to subscriptionStatus I receive the function not found error. Any ideas would be greatly appreciated.

import { subscriptionStatus } from ‘backend/subscriptionMangement’;
let subscriberCheck = 0;
var stripeCustomerIdReturned;
var stripePortalURL;

$w.onReady(async function () {
await getStatus();
});

export function getStatus() {
return subscriptionStatus() //subscribe
.then((subscriber, stripeCustomerId) => {
subscriberCheck = subscriber.subscriber;
})

}