i used specialized bg insoles and wedges for mtb/commuting but using road shoes/pedals with a flatter more rigid insole caused me a few problems, basically an overdeveloped vastus lateralis (outside thigh muscle),glute misfiring and some itb discomfort. a sports physio diagnosed the problem and a good bikefitter (sigma sport kingston) did the cleat shimming/custom footbeds. my knees now pedal straight and don’t brush the top tube and i have no other itb problems.
cheap way: specialized insoles and some wedges and make a note of where your knees are.
more expensive: get custom footbeds (sidas) and get a bike fitter to look at your knee tracking and cleat set-up and adjust shims accordingly.
i often see people with knee mistracking riding around with no problems but i couldn’t ride for more than an hour and would need 2 days off the bike if i didnt use the footbeds/shims