Preheat the oven to 350 F (176 C).
Heat a large nonstick skillet over medium heat, add the ground beef and onion, and cook until the beef is no longer pink (about 10 minutes). Once it’s finished cooking, remove the beef from the pan, discard any grease, and wipe out the skillet.
Return the skillet to the stove on medium heat, and add the butter. Once the butter is melted, add the garlic and saute for about 2 minutes (or until it’s aromatic).
Turn the heat down to medium-low and whisk in the flour (mix until the flour and butter have combined and reached an even texture). In a large bowl (or large liquid measuring cup), mix together the milk and chicken broth, then whisk the liquid into the butter and flour roux, about ⅓ cup at a time at a time. In between each addition of liquid, whisk until the sauce has reached a smooth consistency. Continue until all the liquid is incorporated into the sauce.
Once all the liquid has been added and the sauce is smooth, whisk in the parsley, thyme, salt, and pepper. Bring sauce to a light boil over medium-high heat for about 1 minute to thicken, then stir in 1 cup of the shredded cheese.
Lightly grease an 13 x 9 casserole dish and lay ⅓ of the potatoes evenly along the bottom of the pan. Sprinkle the potatoes with salt and pepper, then spread ⅓ of the sauce and ⅓ of the ground beef evenly over the potatoes.
Repeat this step two more times, creating 3 layers. Add the rest of the shredded cheese to the top layer. Cover the casserole with aluminum foil (make sure that the foil isn’t touching the casserole so that the cheese doesn’t stick to it), and bake for 1 hour.
After 1 hour, remove the foil from the dish, and bake for another 15 minutes. Finish it off by broiling it for 3 - 4 minutes (or until the cheese is bubbling and golden brown in some areas).
Carefully remove the casserole from the oven and allow it to rest for 15 minutes before serving.
