I don't think that's a given, or even necessarily a strong likelihood. A majority of Scotland's trade is with the rest of the UK, unlike the Brexit situation where a shrinking minority of the UK's trade was with the rest of the EU, the only EU member for which this was the case. Scotland is accustomed to deficit spending and to large subsidies from the rUK, neither of which would be epecially palatable to EU finances.
And while I certainly think it's fair to describe the UK economy as a sinking ship, I also think that blaming that on Brexit is, to put it politely, "starting with your conclusion". UK growth has been higher than France, Germany or Italy since 2016. Brexit has obviously had impacts, but they haven't all been negative (the City in particular has zero enthusiasm to fall back into any EU alignment) and I think the COVID lockdown shambles and the Homerically inept current government have been bigger factors.
I found this a decent recent overview on the common analytical takes, if you're interested: https://julianhjessop.substack.com/p/what-the-nber-gets-wron...
It would disrupt UKs defence (nuclear submarines in particular) and energy (oil fields) both of which currently are primarily based geographically within Scotlands territory. This is classic Russian tactics. Its not about whether Scotland joins EU or stays with UK, or which is economically or politically the best decision - its about seeding chaos and uncertainty within one of Russias largest antagonists.
Given that a sentiment for independence of Scotland has only really became an actual topic people discuss semi-seriously after the Brexit, I think it is fair to assume that there is a quite high likelihood of it, and there are quite some EU states that get preferential treatment budget wise, no reason to assume that Scotland cannot become that.
Covid has been global, lockdowns have been everywhere, UK is not unique and did not even have the worst of it in terms of lockdown strictness. While "averaged out" UK economy post-brexit/pre-covid might not look that much worse than EU, if you look into specifics the picture gets far uglier with entire economy sectors going bankrupt, all in all it was a spectacular self inflicted damage that will be felt for decades to come, especially now that US is becoming a hostile actor.
Scotland would be a net contributor to EU finances as an EU state. Its GDP/capita is very similar to the UK's.
Though its notional deficit would be far higher and break EU rules IIRC (which have been broken numerous times by existing EU states).