Yes. The internal width of a rim will impact the tire width.
In addition to that, some tire mfg’s are changing their tire design to accommodate the current trend of wider rims.
GP4000’s were designed to run on narrower rims, so when mounted on a wider rim they measure wider.
GP5000’s are designed for wider rims so they will run truer to the correct wide tire on current wider rims.
A 23mm GP4000 measuring to 26.5mm is a bit extreme. I could see a 25mm GP4000 measuring 26.5mm on an 18mm internal width rim.
I would also expect a 25mm GP5000 to run closer to 25mm on the same rim.
John