Veteran had been at helm since 2020, but resigns with club still in danger of relegation