Pasting bad scripts crashes file and makes it corrupt

This shouldn't happen. I basically crashed a file I've been working on for days by pasting a bad script. Trying to reopen is impossible and so I have to download an old revision and import it back.

I don't want to do that as part of the troubleshooting process. I don't know Lua so I have to learn it and use Claude so there's a lot of reasons I will throw flawed code into rive. This causes way too much friction in what I already consider a high friction software.