wixUsers.promptForgotPassword for custom sign up form.

Hi, I have a custom sign up form in which I used code to prompt the forgot password window. This worked fine for a couple of weeks and then stopped working. WIX Technical Support claim the issue is with the code and if they remove the code it works fine. Only if the code is removed then my members cannot reset their password.
The code I used is from Nayeli - Totally Codable:

import   wixUsers from 'wix-users';
import   wixWindow from 'wix-window';
$w.onReady(function   () {
$w("#forgotPassword").onClick(   (event) => { 
//wixWindow.lightbox.close()
wixUsers.promptForgotPassword()
.then(   ( ) => {
//
} )
.catch(   (err) => {
let   errorMsg = err; 
});
});
$w("#registerButton").onClick(   (event) => {
wixWindow.lightbox.close();
wixWindow.openLightbox("approval");
} );
} );

In the meantime I have had to reverse back to the default sign up.

Any help is highly appreciated!

Tali