Its an issue of preparation. You need to discuss it with her earlier on, agree that washing her hair must be done, and then suggest you will keep a small towel in her hand while you are washing her her, so that she can wipe her eyes at any sign of soap. Usually the towel works.