The Shiny odds max out at 5,000 lightyears
The chance of encountering a shiny after or at 5,000 lightyears is 36% in type four wormholes. Type four wormholes contain legendaries and Ultra Beasts until you have caught or do not "meet the requirements" for them.
As far as I can tell, nobody's really bothered to go further than 5,000 lighyears, as that is when all rarity odds cap. However; It's not possible to go forever, as gold orbs which grant you speed will stop appearing.