To preface that the last guy said, in gaming, the 9700f is slightly better than ryzen. However, if you intend to keep the setup a few years, get the ryzen. Maybe step up to a 3700x. Here's why.
Next generation consoles, xbox series s and x, as well as ps5 will use AMD 8 core CPUs. Meaning that games will start getting developed for that amount of power at some point. If memory serves, the i7 9700 is 8 cores and no hyperthreading. Which is fine today, but in 2 years, you may be wishing it have hyperthreading. I think the difference in gaming is maybe 5-10%. The higher in resolution you go, you'll probably notice those differences less anyway.
In productivity, the ryzen should beat the i7. So it's really up to you. Just look at the budget. Keep in mind to, if you do a platform switch, your Intel gear is probably worth a decent amount used. So that may absorb some costs if you decide to go AMD, or even a newer Intel platform.