@theawfulone in-game, open the RGUI (RetroArch Graphical User Interface) with default Select + X ("north" face button). From there, navigate to quick menu (this should be where you start already) then to controls >> port 1 controls. Set up the buttons how you like, and then go back to the controls menu (one level up from port {n} controls) and "save core remap file."
Do this once each for GB and GBA. Saving it as a "core" remap file will apply the changes to every title on that system. You can also set overrides that will apply on a per-game basis (and override the core setting) by saving a "game remap file" instead. "Content directory remap" isn't very useful, in most situations, since the configs are already separated out by system anyway so they will already only apply to a single content directory, even using the core remap.
This means that even if you use the same lr-gambatte emulator core for GB and GBC games, you still have to remap them separately (unless, you put them all in the GB folder, which you can do with a simple edit to your custom es_systems.cfg file.