Bath time

Every since my daughter turned 1 she hate getting her hair wet and it becoming a point we’re it’s dangerous. She start freaking out when I’m washing her hair and she stand up and try’s to get out of the tub I’m afraid one of these days she’s going to slip and hurt herself. Does anyone have an solution to this problem?