The Merseyside police chief who led the force following the attack on a Southport dance class has announced her retirement.