Hello, Rubber isolation might help and it might not. That depends on the source of the movement. The vent pipe looks to be going into the wall at a 45 degree angle. Is it then going up through the roof, or directly outside through the wall? Two approaches are to firm up the pipe so it cannot move, or to make a resilient mount to attach it to framing, so it can move but not rub against anything and cause noise. If it’s exiting the wall, just possibly a bead of silicon sealant around it and between vent pipe and wall could provide enough support and cushion to stop the noise.
I’m curious about why the pipe is enlarged so much leaving the heater. Was that part of the manufacturer’s specs?