I think it would be best if you could give up your friend's boyfriend yourself, but the reality is not easy, and there are many times when you worry about various things.
You are a person who originally values friendship very much. However, if your feelings towards that person are strong, it is possible to take them away. But it is best to give up as soon as possible if you are not determined enough to hurt your friends. In the future, you may fall in love with someone else, so if you don't want to lose your relationship with your friends, wait for the next chance and seize it!
Don't just focus on your friend's boyfriend. Let's divert your attention to other guys around you. There are plenty of opportunities, but you haven't noticed them. Since you value friendship greatly, hurting your friend would also be painful for you. Consider other men around you as potential romantic interests.