Zelensky didn't accused them collaborating with Russia. Problem is that there is huge number of people who collaborate with Russia in SBU and Prosecutor's Office. It's one of resone why Russia took Kherson so easy without much resistense. And heads of SBU and Prosecutor's Office is responsible for it.
BTW, Ivan Bakanov is old childhood friend of Zelensky, they also worked together in Kvartal 95 Studio.