Salam Miracle114
From my understanding one may omit the form of prayer if one feels fear. (2:239)
The verse 2:239 is clearly suggesting that the form in particular should be omitted if one feels fear. Not the prayer itself. So therefor if the form of prayer is to cause or attract fear from the surroundings in any way then one should pray in some other manner that will not attract any fear to the surroundings. One may pray in a way that the surroundings do not understand that prayer is being established in my humble opinion. This may include walking, riding, being secluded where no one can see etc.
I think this all depends on the individual and circumstances one faces. The location, the people, the gatherings, the situation and atmospheres in ones life.
I think in a world like today one should try to understand their surroundings and the mindset of the people they are around. Believers are given the right to assess their situations and make the best of them.
One thing for sure is believers should try to keep their duty as best as they can.
64:16 “So keep your duty to God as best you can / what you are able (Arabic: ma is’tata’tum), and listen, and obey, and spend; that is better for your souls. And whoso is saved from his own greed, such are the successful”
Insha'Allah that helps
Salam