Problem with code.

Check out the documentation:
https://www.wix.com/corvid/reference/wix-window.lightbox.html#close

You can’t set the closing animation that way, it must be done with the GUI.