I was not using a shield when trying to do this. As I believe even in 5E dnd, it does not work with a shield. Dueling fighting style is based off the idea of Three Musketeers style fighters. Which was my design as well for this build. A halfling dex based ranger using a rapier.
You can most certainly use dueling with a shield in 5e, as a shield counts as armor, not a weapon. It's a staple pick for sword and board users that want to focus on doing damage.
Someone on reddit, said that the dueling fighting style worked with a shield in BG3, but I haven't tested it yet.
If you don't see your character using a shield thematically, then that's pretty cool. I'm not trying to tell you how to play your character, I just like to make sure people aren't misinformed.