I don't think that position was quite as bad for you as you seem to think. Okay, White probably does have the advantage, but Black has some ideas for counterplay. White should probably not have traded off his white-square bishop (19 Bd3), which gives you play on those squares.
I don't agree that 21... Ra5 was inevitable. One intriguing idea is 21... Qxd3 22 Rxd3 b4, the notion being to follow it up with ... b5 and then the maneuver Nb6-c4. You will sac the foremost b-pawn (since it's junk anyway) to get a bit of a bind on the queenside, with White's minors off on the other side of the board and his bishop pretty much just a jumbo-sized pawn.
Black had the better game most of the time. At least according to Stockfish.:)
Actually black has still realistic drawing chances in the final position, even thought it might objectively be winning for white, this is a difficult task.
Thanks! I had overlooked that idea one move too late. After he did Rab1 I had no chacnes of b4.
Thanks, now I feel so dumb that I missed the possible f6 e5 for counterplay. I had totally overlooked the f6 break which is also possble in the caro-kann.