The only surefire way writers tend to handle this is by having the surrounding characters also be female - female bravery vs. female cowardice, so as not to give the impression of implying cowardice is female.
You can try not to couch things this way, but the lingering impression will remain.