PyMC does not allow for that kind of syntax. In the future it would allow for something defined in terms of dispersion, that is:
with pm.Model() as m:
dispersion = 1 / HalfNormal.dist()**2
m.register_rv(dispersion, name="dispersion")
But that relies on Aeppl, where we are implementing this sort of functionality, and we dont yet have support for squaring transformations. You can follow progres in GitHub - aesara-devs/aeppl: Tools for an Aesara-based PPL.