I’ve never had the sweat in the eyes outside problem but I do know a few folk that wear a cap for that reason. Where I have had a problem is indoors and wear a Castelli Sweat Band perhaps it would be of use to you outdoors.
Castelli Summer Headband - SS23 | Merlin Cycles
Edit I see there is a skull cap version of it too:
Castelli Summer Skullcap – Saddleback Elite Performance Cycling