Not quite D&D, no.
As far as I know there is no penalty for switching a weapon but from what I can find switching seems limited - it seems that each player gets one free object interaction per round and that can be used to switch weapon.
The issue BG3 is something else entirely - BG3 doesn't really have weapon load outs: you have slots for one melee and one ranged set up and those are always equipped, no matter what your character has currently in hands. It seems to me to be there mostly to support Larian's hotbar UI design. Usually D&D and D&D-like titles have multiple weapons slots between players can switch between with some per-turn restrictions.