You should be cloaked while scanning, sitting somewhere like 100-150 km off planet (not sun or gates). There is no need to put drones out.
ECM drones would allow you to warp out if you’re lucky. If someone lands on you put your ECM on him and once he’s jammed warp away. Don’t try to pull in your drones - saving ship is more important.
Also while scanning in null or low try to sit somewhere cloaked if someone else is in the system. Otherwise you have a chance of someone landing on top of you and boom.