The hits from the rushing attempts may cause cumulative damage that shortens careers. This is more of any hypothesis than a definitive statement.
Lamar is in year 4 (2018 rookie). That is the equivalent of Cam in early 2015. Cam, at that point, also hadn't come close to getting hurt running the ball.
My idea is that if you use your QB like an RB, don't be surprised if their longevity is closer to that of an RB than a QB. RBs drop off after age 30. Cam is 32. Lamar is 24.
We can try to refine this a bit more. 1800 carries seems to be about when RBs falter. Cam had over a 1000 carries, and also took 322 sacks. That alone puts him at around 1400 hits. We also know QBs often get hit after releasing the ball, but I can't find any stats on that. Newton had 4383 career pass attempts. Getting hit on just 10% of those puts him at the magical 1800.
How does Lamar compare?
I put Lamar at around 682 total hits. 510 rushing attempts plus 72 sacks, plus about 100 QB hits (He has 1003 career pass attempts. If we use the same (admittedly arbitrary) 10% of pass attempts where Lamar is taking a hit).
He has about 60 more rushing attempts than Newton did at the same stage of their career, but Lamar has taken half the number of sacks (72 to 152 for Cam at the same point in this career).
I would guess Lamar has 4-7 more good years, but the closer he gets to age 30 and/or 1800 hits, the more I'd be worried if I was a Ravens fan. If you use your QB like an RB, don't be surprised if their longevity is closer to that of an RB than a QB.