  We investigate the Berezinskii-Kosterlitz-Thouless (BKT) scaling of the
critical current of Josephson junction dynamics across a barrier potential in a
two-dimensional (2D) Bose gas, motivated by recent experiments by Luick
\textit{et al.} arXiv:1908.09776. Using classical-field dynamics, we determine
the dynamical regimes of this system, as a function of temperature and barrier
height. As a central observable we determine the current-phase relation, as a
defining property of these regimes. In addition to the ideal junction regime,
we find a multimode regime, a second-harmonic regime, and an overdamped regime.
For the ideal junction regime, we derive an analytical estimate for the
critical current, which predicts the BKT scaling. We demonstrate this scaling
behavior numerically for varying system sizes. The estimates of the critical
current show excellent agreement with the numerical simulations and the
experiments. Furthermore, we show the damping of the supercurrent due to phonon
excitations in the bulk, and the nucleation of vortex-antivortex pairs in the
junction.
