There is currently a lot of confusion around getting the Sonos ARC setup with LG tv's. Most of this discussion is around the eArc connector support and whether your specific model of LG TV will output Dolby Atmos.
For the purposes of this post I just want to focus on one thing - the LG Magic Remote.
The TL;DR here is that you need to re-run through the soundbar setup on your TV - it's nothing to do with the Sonos app.
Before I get into the nuts and bolts of this post I'd just like to explain my setup. I have a LG C9 55" OLED running firmware version 4.80.03. I'm connecting my tv to the Sonos ARC on HDMI port 2 (the e-Arc port) using a HDMI 2.1 spec cable from Monoprice (something like https://www.amazon.de/gp/product/B07RG7ZZ8K/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1).
Initially when I connected everything up, my TV found the soundbar and walked me through the setup, including getting the remote to work.
However, once I started playing around with some of the settings on the TV I noticed that I lost the ability to control the volume through the remote control. I put this down to the Sonos ARC just losing the settings so I tried to get the soundbar to recognize the remote using the IR Remote Setup option on the Sonos app.
This would only work when the TV was turned off. It turns out that the magic remote will use IR only when the tv is off. If the tv is on, I believe it's using bluetooth so you won't be able to get the Sonos ARC to recognize the remote when the tv is on.
Obviously, this wasn't going to work for me as the whole point of the soundbar is for your TV to be turned on!
Luckily, the solution isn't too tricky to resolve. Press the Settings button on your remote and go into the Connection menu item. Select the Device Connector menu item.
Select the 'Bluetooth/Sound Bar' option.
As you've already setup the Sonos ARC, just click on 'Reset Device' and follow the onscreen setup. Make sure to leave the SimpLink option selected and when it completes you should be good to go.
Your LG remote should now be working with your ARC again! Phew!