If you give us more detail about the boat, and the general location, perhaps the input will be more helpful.
If it is fiberglass
, I'm wondering why you sanded and compounded it before waxing, because gelcoat
is porous, like tiny bubbles, and if you use rubbing compound on it you can open the tops of the tiny bubbles, creating pockets to hold dirt.
If it is a painted surface with wax on it, maybe you have acid rain where you are that already ate away the wax, and the industrial pollution ate into your paint
. Fwiw, our topsides are painted, and dirt leaves stripes like the pic you posted, but it wipes off with dishwashing liquid (like Dawn or Joy) thinned in water
. "Plain soapy water
So, you might tell us exactly what you have already tried and the other info I suggested, and I bet the guys can sort it out for you.
on edit: If all else fails, wipe it with acetone, then re-wax.