Sunnyvale’s top public safety officer is retiring at the end of April, after steering the city through its COVID-19 emergency response and bolstering community trust in the department.