Toss leeks, potatoes, oil, and remaining garlic heads and 5 thyme sprigs in a large roasting pan; season with kosher salt. Place pork on top of vegetables and brush all over with some garlic butter. Roast, basting with garlic butter every 30 minutes or so and stirring vegetables, until an instant-read thermometer inserted into center of pork registers 120°, 75–105 minutes. Transfer pork to a cutting board. Tent pork with foil. Let rest at least 45 minutes or up to 3 hours.