Thankfully, the advice wasn't necessary for jahierrandeevee, as they immediately shut down their game and rebooted it, and were able to find the Shiny Onix again. On the second attempt ...