If you are talking gale-force winds, and the bear is not downwind. But I would disagree about “if the wind is blowing” if you mean to imply any kind of wind will automatically render it ineffective. Even in high wind conditions (and we do get that a lot in WY) I’d still expect the bear spray to work and be able to put it in the bears face, just at a reduced range.
The wind gusts out there in grizzly country are random and unpredictable.
There are bullets available that don’t bounce off the bear’s skull, even at an angle. These bullets are made to drill into the skull.
Here is an article discussing the testing of bear spray in wind and cold, and what effects were found.
https://www.ammoland.com/2020/11/study-on-bear-spray-confirms-performance-limitations/