I thought snap to increment and absolute grid snap were only available in orthographic view, but somehow I managed to activate it in a viewport in perspective mode. How did I do that?"
I just realized my mistake.
I didn't realize that I had set a different grid unit in the viewport in perspective mode, so when I moved something there, it moved a lot. I had .0025m in orthographic and .025 in perspective. You have to use the same grid unit on all viewports for snap to grid to work correctly