Did you notice if it happens with other games too? Did it start happening after a Discord/Logitech drivers/FF XIV update? It could also be a driver problem if that is the only device that's not working correctly. I would try report this bug to Discord/Logitech to see if they can fix it with an update. As a general tip you can also try to update/reinstall the G13 drivers (also, keep Discord up to date just to be sure).
This might sound stupid but you can also try to plug the device on a different port on your pc and see if this still happens.

Sorry for the different bunch of things but I'm trying to think what the problem is and those just came to mind.