Hundreds of police officers and staff across Yorkshire have committed sackable offences since 2020, figures show.