Seems like potentially a good situation for you? I assume you didn't have to pay anything directly out of pocket to the repair shop, since the insurance was covering it. So your only relationship is with your insurance company. By declaring a total loss, insurance will pay you used market value for your car. Sot that alone makes you whole.
On top of that, depending on your risk profile, you probably have the option to buy back the salvage vehicle at significantly lower than market value (possibly around $15K), if you feel the car is working just fine. There's a lot of complexities with registering and insuring a salvage vehicle, but you might be able to buy it back at quite discount. And unlike purchasing a third-party salvage vehicle with questionable history, the history of this vehicle is entirely yours, and you've been driving the repaired vehicle, so at least can judge yourself if the car is OK.
On my Model S that was totaled by a drunk driver a few months ago, I had the option to buy back the vehicle for $15K, which I think is about what a totaled Tesla with an intact HV battery goes for at auction. They declared it a total loss just because airbags went off, but I think it could have been repaired for $5-10K, I just didn't have any place to store the vehicle to get it repaired without blocking my driveway and other car. But it could have been a good deal. I think a later model 3 could be similar salvage value.
Similarly, a tree branch fell on a friend's old Toyota in front of their house last month, mainly breaking the windshield and denting the hood and fender. They got $8K for the total loss, and bought back the car for $1K. They've already replaced the windshield for a few hundred, so the car is driveable again, will find a parted out hood for cheap, and maybe will try to pull the dent on the fender but probably not. So back on the road for maybe $1500 all-in, maybe some slight dents and paint issues. But basically netted over $6K because of the total loss, and still have a usable and presentable car.