The Crimson Binome
Hero
You could also have a Dexterity higher than your casting stat, depending on which spells you pick, and other factors.That's not quite how it works out.
You aren't going to have a +4 in your secondary stat unless you are rolling stats. You are realistically looking at a +2, maybe a +3 if you have one of the races with a DEX boost. Then you have to figure in accuracy: Not only will you be hitting more often with your (higher than DEX) casting stat, numerous cantrips have the benefit of not requiring an attack roll, and thus ignoring the penalties of cover. Given that your own parties melee squad gives the enemy cover by simply being close enough to stab them, you are going to be sitting on an additional -2 to -5 penalty for crossbowing most of the time.
Likewise, whether or not cover is a frequent concern, is something that will vary alongside a number of factors. Your melee friends only provide cover to your enemies if they are actually between you and them; and even then, you can often solve that problem by moving to get a clear line of fire.