Preheat the oven to 400° F.
Place a shallow non-stick ovenproof pan (10" cast iron skillet) over a medium heat, and add the butter and sugar. Once it starts to sizzle place the onions, cut side down, into the pan and arrange them so they all fit in. Season with salt, pepper, and sprinkle with thyme leaves.
Reduce the heat (using a heat diffuser if necessary) and gently cook the onions for 15 minutes until they are soft but still have some texture and they begin to caramelize. Test by sticking a skewer into the onions and If they are not quite ready give them another 5 minutes or so.
Switch off the heat under the pan and place the pastry over the onions tucking the edges down around them. Bake the tart for 20-25 minutes until the crust is crispy and golden brown.
Let cool the tart for 5 minutes out of the oven. In the meantime, heat the Alfredo sauce according to package instructions. Invert the tart on a big plate or a chopping board, drizzle with Alfredo Sauce and serve warm.