(SOLVED) Code not working when previewing from dashboard

You have basically set up exactly the same as this tutorial here.
https://support.wix.com/en/article/corvid-tutorial-hiding-an-element-on-certain-pages

The only difference is that you have done yours as separate entries, whereas the tutorial combines them all as one entry, however, either way will work for you.

As for preview mode, there is only the one preview mode that you can use within Wix and that is the preview mode from within the editor itself.
https://support.wix.com/en/article/previewing-your-site-5935671

There is no preview mode on the dashboard itself.

As shown above, you can view live site, however no preview mode.

So, if it all works fine in the actual preview mode from within the editor, then it should work fine when you save and publish it too.