Oscillating magnetoresistance due to fragile spin structure in metallic GdPd$_3$