The dynamics of domain walls in a square of permalloy (Ni$_{81}$Fe$_{19}$; Py) upon excitation with an oscillating magnetic field of 4 mT amplitude were recorded by pump-probe ptychography with X-ray magnetic circular dichroism (XMCD) at the Ni L$_3$-edge. The 2.5 $\mu$m Py square of 160 nm thickness forms a vortex flux-closure pattern with domain walls that fall into alternating out-of-plane magnetization states due to the interplay of in-plane shape and growth-induced perpendicular anisotropies. Dynamic modes of the domain wall structure were excitable along with the vortex core gyration with frequencies of 500 MHz and 1 GHz. Micromagnetic simulations served to corroborate the imaged domain wall motion.