Although I believe it is not the preferred way, I still have a few extensions that load a JavaScript file from the forum's/extension's assets folder. In the past this worked fine.
It seems with newer versions of Flarum, you can refresh your browser multiple times and sometimes the JS file from the public assets folder doesn't load.
I'm not submitting a GitHub issue yet until there's some discussion around this to be sure.
Here's a recording/gif. What you see below is I refresh the page and there is a 404 error in my console saying it can't load a JS file in an extension's assets folder. Then I refresh a few times, and same issue. BUT, I scroll to the top of the site, and then refresh, and MAGIC, the JS file loads.