Code working on test mode but not on live mode

Hello.
I’m very new to coding and I’m trying to make some sections and buttons appear after my video finishes.

Everything seems to work great on the the test mode but when I publish the site nothing happens…

This is the code:

$w(‘#videoPlayer1’).onEnded((event) => {

// Sección 48
$w("#section48").expand(); // Expande la section48
$w("#section48").show(); // Muestra la section48

// Sección 54
$w("#section54").expand(); // Expande la section54
$w("#section54").show(); // Muestra la section54

// Sección 49
$w("#section49").expand(); // Expande la section49
$w("#section49").show(); // Muestra la section49

// Sección 43
$w("#section43").expand(); // Expande la section43
$w("#section43").show(); // Muestra la section43

// Sección 52
$w("#section52").expand(); // Expande la section52
$w("#section52").show(); // Muestra la section52

// Sección 53
$w("#section53").expand(); // Expande la section53
$w("#section53").show(); // Muestra la section53

// Botón 34
$w("#button34").expand(); // Muestra el button34
$w("#button34").show(); // Muestra el button34

$w("#section42").expand(); // Expande la section42
$w("#section42").show(); // Muestra la section42

});

And this is the site: https://www.sealightsdesign.com/workshop-estrategico

Thank you for your help!