Hi [Recruiter Name],
Thanks for your email! While I am saddened to learn that I will not be moving forward in the process, I greatly enjoyed learning more about [Company Name] and the team. If you are able to provide feedback on my performance throughout the process, I would greatly appreciate that.
Regardless, I greatly enjoyed my interview experience and would love to stay connected should there be future opportunities that you believe I am better suited for.
I wish you well in finding the best person for the role and I hope to stay connected!
Sincerely,
[Your Name]