2004 CRF 450 and 250s had a poorly sealed airbox. They have a tendency to suck dirt in post filter and deposit into the valves. I had a 2004 450 and it was awful. It was in the shop once a month getting valve adjustments and eventually, it needed new valves ($1000). I sold the bike and lost my ass. That bike gave 4 strokes a bad name. Years later mechanics blamed the issue on the design of the airbox. I know that valves on the newer bikes last a lot longer. My friend has a 2004 CRF250 and his bike frequently visits the shop for valve work as well.
Compression is important but it may not tell you the real problem. Lack of compression in a 4 stroke could be the piston ring which is easy and cheap, or it could be a valve hanging open because it needs valves. That is an expensive repair that requires machining of the head.
If you're set on this bike, I would have it inspected to see which shims are in the valves. Once you're on the last set of shims, that's it, it will need valves.
Personally I'd buy a newer bike. Or get a 2 stroke which will be far cheaper to maintain, and in my opinion, more fun anyway. I've ridden many bikes, and the oranges ones rule.