Perhaps this? Add to Warlock, Sorceror and Wizard spell list. Maybe to Bard & Ranger?
Combat Insight
cantrip Divination
Casting Time: 1 bonus action
Range: Self
Components: V, S, M (An obsidian arrowhead)
Duration: Concentration, up to 1 minute
Upon casting this spell, you gain a mystical martial insight. For the duration of your spell, melee or ranged attack rolls with weapons use your spellcasting modifier to hit and damage instead of Strength or Dexterity (respectively). However, you must use your entire focus for the attack and cannot use Extra Attack when gaining the benefit from this spell.
At Higher Levels: At 5th level, your attacks with weapons deal an extra 1d6 damage, based on the weapon type - bludgeoning, slashing or piercing. At 11th level they deal an extra 2d6 damage. At 15th level, weapon attacks deal an extra 3d6 damage.
Ideas to keep this from being exploitable with Arcane Trickster Sneak Attack & Paladin Smite (possibly as a Paladin-Warlock? Or is Concentration sufficient?