Code only works in preview

I’m experiencing the same thing. Assuming it’s a temporary bug. We shall see…