Prep the pork: Pat the tenderloins dry.
Season all over with salt, pepper, and smoked paprika. Let sit at room temperature for 15–20 minutes while you start the onions.
Caramelize the onions: Heat a large oven-safe skillet over medium heat. Add butter and 1 tablespoon olive oil.
Stir in the sliced onions and a pinch of salt. Cook, stirring every few minutes, for 25–35 minutes until deep golden and jammy. If they brown too fast, lower the heat and splash in a little water to deglaze.
Add garlic and deglaze: Stir in garlic and cook 30 seconds.
Pour in wine (if using) and scrape up browned bits. Let it reduce by about half. Add 1 cup of the beef stock, Worcestershire, thyme, and bay leaf.
Simmer 5–7 minutes. Taste and season with salt and pepper. Transfer onions to a bowl, leaving some sauce in the pan.
Sear the tenderloins: Return the skillet to medium-high heat and add the remaining tablespoon of olive oil.
Sear the pork on all sides until nicely browned, about 6–8 minutes total.
Nestle and roast: Turn off the heat. Spoon most of the onions around and over the pork, reserving a little for topping. Whisk Dijon into the remaining 1/2 cup stock and pour around the pork.
Tuck in the thyme sprigs and bay leaf if not already in the onions. Transfer the skillet to a 400°F (200°C) oven and roast 12–18 minutes, or until the thickest part reads 140–145°F (60–63°C).
Rest the meat: Move the tenderloins to a plate and tent loosely with foil for 10 minutes. This keeps the juices in the meat.
Finish the sauce (optional thickening): If you prefer a thicker sauce, bring the onion mixture to a gentle simmer on the stove.
Sprinkle in the flour and whisk for 1 minute. Simmer 2–3 minutes until silky. Adjust seasoning.
Slice and top with cheese: Slice pork into medallions, about 1/2 inch thick.
Return slices to the skillet, nestling them into the onions. Scatter the reserved onions on top. Cover evenly with shredded Gruyère or Swiss.
Broil to melt: Set the oven to broil.
Broil 1–3 minutes until the cheese is melted and bubbly with golden spots. Keep a close eye—it goes fast.
Serve: Spoon saucy onions over each portion. Finish with fresh thyme leaves and cracked pepper.
Pair with mashed potatoes, buttered egg noodles, or crusty bread.