Strongly suspect fuel level sensor (sending unit) inside fuel tank - part of the fuel pump module,
Conformation by professional quality scan tool suggested.
RepairPal Certified shops can diagnose and repair your 2005 GMC Yukon XL 1500. They provide transparent pricing with a minimum 12-month or 12,000-mile warranty on repairs and services.