Take a look onto my given code one more time!
Did you perhaps forget something?
Did you copy and paste? I think not, that means something gone wrong and you forgot to add or modify some code-parts.
Your code…
$w("#checkbox2").onChange((event)=>{ ........
My code…
$w("#checkbox1, #checkbox2").onChange((event)=>{ .....