Have lost matches where I gained rank and lost rank when I won matches. This has happened reaaaally often. Not every match, but every few matches.
You may be interested in the following thread:
Long story short, many others are confused, but this is a normal quirk of the ranking system, which retroactively considers changes in your opponents’ ratings.
This can happen with glicko2 when we do immediate rating updates within a rating period. The chances are about 12% for it to happen.