Medicated feed has Amprol in it which is a thiamine inhibitor, coccidia require thiamine to survive, so the Amprol blocks thiamine uptake and prevents coccidia from propagation.
There is no required egg withdrawl period in the US but here in Canada there is a 14 day withdrawl period. Last year I fed medicated chick starter to my grups and ate the eggs and I was fine
This year because I sell eggs - and I am hard pressed to find an All Flock feed I am stuck feeding an mix of my layer and purina start and grow (terrible stuff is nothing but dust!) as a wet mash - I need to find a good grower but it’s really difficult - impossible really. And forget about an all flock.