I used to use OBS and a “window capture” that was set to mGBA. I adjusted the screen size accordingly from there. The other tips mentioned here are good too.
I recommend reading HeartHero’s thread on the topic as well. PentV also has a helpful post on this topic.
Good luck!