There are no NEC code required distances that a gas pipe must be kept from a recessed can that I am aware of.
Also as far as I am aware there is no fuel gas code requirements for a specified distance that a gas pipe must be kept from a recessed can.
If you are using CSST there may be a manufactures installation requirement for a distance.
Chris