I know this is an older thread but my comment might be useful for people reading this thread in the future.
I am 46, male and had a total knee replacement in 2019.
I bought a mountain bike to give something to do during the covid lockdown. I can easily ride the bike up hill and bomb down. I have zero pain, in fact since I rehabbed from the surgery I have been able to surf again, run again, use weights in the gym (squats, deadlifts) and I plan on returning to snowboarding.
My friends are taking me on some proper decent mountain bike trails soon and I expect to have zero problems (apart from a lack of talent).
I made sure that I prehabbed prior to surgery to keep mobile and rehabbed properly afterwards, which is essential for a positive outcome.
As far as racing goes, I'm not a bike racer but since getting on a bike, it has crossed my mind. I will see how it goes but not because of the knee but more of do I have the talent for it. However, I did complete a zwift 40 minute FTP test the other day with zero issues.
One final thing. The knee replacement changed my life for the better, before I couldn't even walk without pain, and if I did any sport I couldn't walk for 3 days. Now I can do whatever I want.
Good luck to you.