During the development of gas reservoirs with water, water invades the reservoir along preferential pathways, trapping a large amount of residual gas in the reservoir. Research on the distribution of residual gas after water invasion is crucial for further exploitation of the gas reservoir. Based on 50 core samples from the loose sandstone reservoir of the Se-Bei gas field, single-core water flooding gas experiments (20 samples) and parallel-core water flooding gas experiments (15 groups) were conducted under reservoir conditions (15MPa, 40°C) to study the effect of permeability difference on the distribution of residual gas. The results showed that: (1) The higher the permeability, the lower the residual gas saturation, exhibiting an exponential decrease. When the permeability is less than 4mD, the residual gas saturation is greater than 40%, indicating a focus area of water trapping gas. When the permeability is greater than 15mD, the change in permeability has a minor effect on the residual gas saturation, which is less than 30%. (2) The greater the permeability ratio, the greater the difference in residual gas saturation between high and low permeability cores, with the low permeability core having a higher residual gas saturation. The influence of the permeability ratio on the distribution of residual gas can be categorized into water trapping zone (permeability ratio > 15), water trapping zone (6 < permeability ratio < 23) and no influence zone (permeability ratio < 6). (3) After water invasion, the residual gas mainly distributes in the region with permeability less than 4mD and permeability ratio greater than 15. The experimental results can provide technical support for the study of the distribution of residual gas in similar reservoirs and the optimal selection of potential gas reservoir areas.