Recently, window.figma is occasionally unavailable

Recently, I often encounter the error Figma is not defined in the console

The Figma plugin API in the global variable no longer exists. Refresh the page to restore it to normal

This is an occasional problem that has appeared recently. It is very disturbing. Did the recent Figma update break something?

Sometimes this happens. But this problem is not new. Here, for example, I answered someone who encountered it in January 2023: