Nearly 600 police officers were sacked and barred from returning to the job in the year to March 2024, figures show.