Works great in preview but not in publish mode

Hi, I think it happens bacauze of live database doesn’t have items. Sync sandbox to live then check.

To sync the database:- go to database there you will see an option “sync” choose that and then sync items to live database.