I have been told that hanging around gay men can scare of straight men. Do you think this can be the case?

Yes it can, but not for any homophobic reasoning as some might think. Many woman with gay men in their friendship circle will probably hear this and probably be quick to jump to their defence. But it’s more to do with the desire or lack of desire to meet straight men and accessibility to them when socialising in gay men world. Hanging out with men who love men can see you in social situations with more men who love men. This might be just an extended social group and social setting or clubs and bars. Let’s face it it’s just a numbers game. You might not find and meet as many straight eligible men in these situations as you would be hanging out in other contexts.
But it might also have something to do with your lack of desire to meet these men due to these gay men fulfilling some of your male needs. There might not be a sexual relationship but an intimate one that can occur. When you are experiencing a friendship that involves intimacy with another man, regardless of any sexual behaviour being present or not, it can see various needs fulfilled and keep your eyes not as focus on what or who is out there.
But there are some straight men that are fearful of gay men and might feel unconformable in their presence. There seems to be these feelings amongst some straight men than any gay man will try and hit on them. This could just be a matter of these men being uneducated or not having had many gay friends before. Don’t be offended by it but help them to see that this is not necessarily the case (well not all of the time).
When it comes to if your gay BF is scaring away potential male suitors, it’s not so much as them scaring other men away but you taking your eyes and attention off the market.