Berezinskii–Kosterlitz–Thouless transition and criticality of an elliptic deformation of the sine-Gordon model