Melt butter in a skillet over medium-low. Cook onions for 15–20 minutes, stirring often, until deep golden. Add water if needed to prevent sticking. Set aside.
Mix beef with garlic powder, salt, pepper, and ketchup. Shape into 8 thin square patties. Cook in skillet over medium-high heat, 1–2 minutes per side. Set aside.
Whisk mayo, lemon juice, pepper, garlic, parsley, and ketchup in a bowl.
Spread aioli on 8 slices of bread. On 4 slices, layer cheese, patty, onions, second patty, more onions, more cheese. Top with another slice of aioli bread. Spread 1 tsp mayo on top slice.
Cook sandwiches mayo-side down in a skillet with a press, 3 minutes per side, until golden and melty.
Slice diagonally and serve hot.