I had hip labral tear repair (and polishing of the femoral head and “rim trim” on the socket) in mid 2018 and I ran the Pikes Peak Ascent 14 months later, and I just did the full Pikes Peak Marathon 3 weeks ago.
Everyone’s recovery is different however, but if you do it right then I’d say it should be a possibility. Just remember that recovery isn’t linear, you’re going to have setbacks along the way but that doesn’t mean the whole process was a failure.
Glad to offer any other advice on my experience.