How to prevent vehicle from flipping back on wheels

Hi, I’ve got a problem with my vehicle. My car is on its side, and it slowly rolling over on the wheels - it’s ok. When raycasts which is inside wheels hits ground, it flips the car immediately on back wheels, and it looks stupid. So, how can I disable this feature or just edit it’s parameters?
GIF

I would look to Borderlands 2, I not quit sure what they did to stop rolling but I have a hunch.

So One you would need to know what angle (in 2d space for example) the car is at.
How you might do this, maybe ray trace, or look up ways to detect angle.
so figure out what the angle is.
and
if the car attempts to go over this angle you would just set the angle back to the max possible angle (you will need to play around with some values).
This would give the illusion that the car is falling but not flipping, and I don’t think you’ll get any strange shaky movement with this idea.
Then once you have the forward direction, You reapply the technique for the right direction.
I’ve tried looking up how gearbox made the vehicles but I couldn’t find much.

It might help. But what about ray tracing in the wheels? Can i adjust properties such as the length or flip force?

well that might seam like a more complex solution. If the wheels are attached to car body, then you really only care about car body angle. Because if your car body is within a certain constraint then that would indicate that the car has not flipped over. Then on extreme cases you would have a self flipping solution. Then if the self flipping solution fails, then that means the car ONE cannot flip back on its own, and Two you (the dev) will need to decide what should occur.
So in borderlands if the car flips it attempts to flip back, but it will also kick the player out of the car if it can’t flip easily, some games would just cause the car to explode but its game dependent on what you might plan.