Longitudinal and transversal resonant tunneling of interacting bosons in a two-dimensional Josephson junction