TO220 isolpak is the answer, at least then only the leads are the worry, and you can use additional insulation there to improve thermal performance and heat transfer with silicone thermal pads. Otherwise you have to use ceramic washers, as those ate thick but still transfer heat well, or simply have a second isolation barrier and a small heat spreader that is insulated from the main grounded heatsink. If you are still not getting clearance you need another package more suited to high voltage use, and this them is where you start using industrial power electronics devices in isolated packages, where they use a thick aluminia substrate internally to provide the isolation, and a thick potting of Parylene to prevent creepage or conductive paths forming. Normally you get 6 IGBT, bipolar or MOSFET transistors, and 12 high power diodes in the package, arranged as 3 half bridges with freewheel diodes, and a separate 3 phase mains bridge rectifier.