I definitely think there's a degree of maturity where a person separates potential sex partners and potential friends. Or Maybe it's just me and I assume everyone wants to horndog with everyone. Which is okay, just keep it in your pants.
I've been married for 15 years now and I usually deflect any forms of attraction (men and women). I've had a few times where they confess, and I've always just kind of shrugged and let them know I'm not the person they built up in their heads. if they get creepy, quietly move on. Most don't and we're lifelong friends.
Again, maturity plays a huge part. And if they're not mature enough to see you as a person, whoever you are... That's on them. It may feel lonely on your part, but honestly, the drama with people who have obsessive crushing is way honestly more annoying.