Leptogenesis in cosmological relaxation with particle production