Quora:
Does a gun barrel expand due to gas pressure?
Allen Davis
Yes, but it’s microscopic and very, very, very brief. On the order or nanoseconds. It’s this expansion that has allowed for technology to be developed in which chamber pressures can be accurately measured by use of piezo electric sensors.
ChatGPT is not wrong!