I've got dysfunctional Minimize / Maximize / Close window controls in all my apps in Ubuntu 24.04. If I maximize my window to full width by clicking the maximize window button, then all of the controls that are located in the 4 cm. wide area of the screen on the right side of the window don't work. I can still close the window normally by right-clicking its icon in the Dock and selecting Quit.
Maybe it's not relevant, but I can also reduce the size of the window from maximized to a smaller size by double-clicking on the panel. Another clue is that I have two HDMI ports on my computer. One HDMI port is for the graphics card and the other port which is currently unused is for the integrated graphics of the CPU.
Unknown Display from the CPU's integrated graphics (labelled ② in the screenshot) was positioned to the right of my primary display which is connected to my monitor. This was causing about 4 cm. on the right side of my app windows to be have dysfunctional window controls. Dragging the unknown display from the right side of display 1 to the left side of display 1 fixed the problem.