Catalyzes the transfer of sulfate to position 4 of the N-acetylgalactosamine (GalNAc) residue of dermatan sulfate. Plays a pivotal role in the formation of 4-0-sulfated IdoA blocks in dermatan sulfate. Transfers sulfate to the C-4 hydroxyl of beta1,4-linked GalNAc that is substituted with an alpha-linked iduronic acid (IdoUA) at the C-3 hydroxyl. Transfers sulfate more efficiently to GalNAc residues in -IdoUA-GalNAc-IdoUA- than in -GlcUA-GalNAc-GlcUA-sequences. Has preference for partially desulfated dermatan sulfate. Addition of sulfate to GalNAc may occur immediately after epimerization of GlcUA to IdoUA. GlcUA to IdoUA. Appears to have an important role in the formation of the cerbellar neural network during postnatal brain development.