I’ve figured out what was happening and how to fix it: ESBuild not allowing import of Phoenix and LiveView suite in the app.js file · Issue #5491 · phoenixframework/phoenix · GitHub
This saved me ton of time today!
~/.pnp.cjs and it works!!
Sorry for the late reply.
It was actually linked to Yarn as you suspected from the beginning.
Thanks for your feedback. I have added a comment on Github and closed the ticket.