Sorry you ran into this.
If the view was previously saved, you can use Discard Changes in the Filter Pane on the left to restore it. In some cases, it may also be enough to disable the column sorting under Filter → Group & Sort → Sort and set the sort order to (None).
That said, we agree that accidentally clicking a column header shouldn't make a complex sort configuration so easy to lose. We'll take your feedback into consideration as we look at improving the experience. Thank you.