Preheat oven to 400 degrees F.
Melt butter in a large oven-safe skillet over medium high heat. Add onions and 1⁄4 cup beef stock and sauté for 10-12 minutes until soft and golden brown. While onions are sautéing, season both sides of pork chops with salt, pepper, thyme and garlic powder.
When onions are done, remove from skillet and set aside. Add pork chops to the same skillet and cook for 3-4 minutes on each side until golden brown then set aside with the onions.
Add remaining 2 cups of beef stock to the skillet and whisk in flour until combined. Bring to a boil, reduce heat to low and cook for a few minutes until thickened.
Add pork chops back to the skillet and spoon some of the sauce over top. Top pork chops with gruyère cheese then spread cooked onions on top. Sprinkle some fresh thyme on top as a garnish, if desired, and bake for 8-10 minutes or until cheese is melted.