Preheat your oven to 400°F.
Melt the butter in a large, oven-safe skillet over medium heat. Add the onions and 3 tablespoons of beef broth. Sauté for 3–4 minutes, until soft and translucent, then reduce the heat to medium‑low. Cook 12–15 minutes, stirring often, until the onions turn deep golden brown. Transfer to a bowl and cover to keep warm.
In the same skillet, raise the heat to medium. Add the vegetable oil. Pat the thawed diced potatoes dry with paper towels, then add them to the pan. Cook for 5–8 minutes, stirring occasionally, until lightly crisped and golden. Transfer to a plate and cover to keep warm.
Return the onions to the skillet. Sprinkle the flour evenly over them and stir 1 minute over medium heat to cook off the raw flour taste.
Gradually pour in the remaining 1 cup of beef broth, whisking until smooth. Simmer 2–3 minutes, until slightly thickened. Season to taste with salt and freshly ground black pepper.
Gently fold the potatoes into the onion mixture until evenly coated. Sprinkle the mozzarella and Parmesan over the top. Transfer the skillet to the oven (or use a greased 2‑quart baking dish) and bake for 3–6 minutes, just until the cheese is melted and bubbly.
Remove from oven and let the dish rest for 2–3 minutes. Garnish with crispy fried onions for extra crunch before serving warm.