We explore vortex dynamics in a two-dimensional Josephson junction array of micron-size superconducting islands fabricated from an epitaxial Al/InAs superconductor-semiconductor heterostructure, with a global top gate controlling Josephson coupling and vortex pinning strength. With applied dc current, minima of differential resistance undergo a transition, becoming local maxima at integer and half-integer flux quanta per plaquette, f. The zero-field transition from the superconducting phase is split, but unsplit for the anomalous metal phase, suggesting that pinned vortices are absent or sparse in the superconducting phase, and abundant but frozen in the anomalous metal. The onset of the transition is symmetric around f=1/2 but skewed around f=1, consistent with a picture of dilute vortices/antivortices on top of a checkerboard (f=1/2) or uniform array of vortices (f=1). Transitions show good scaling but with exponents that differ from Mott values obtained earlier. Besides the skewing at f=1, transitions show an overall even-odd pattern of skewing around integer f values, which we attribute to vortex commensuration in the square array leading to symmetries around half-integer f.