The lightyears metric doesn't affect legendaries/UBs, as far as I am aware, so I'll move on to non-legends.
For non-legends, their shininess is already determined upon entering the world, so even if you could affect it the lightyear metric (which again, AFAIK isn't stored), wouldn't matter cause shininess was already determined.
It means that the encounter was already decided to be shiny or not shiny. As long as you're in that world, even if you reset the game, the shininess of the encounter is already decided.
Read here: https://projectpokemon.org/home/forums/topic/39433-sm-usum-save-research-thread/page/3/#comment-239090
So edit the byte in a hex editor, load the save into PKHeX to fix checksums, then export the save. Then import into your game.