expression

To lose the plot.

Theme: judgment Keyword: book

means

To become confused or lose one's ability to act sensibly (British informal).

Example

When he started blaming the customers, I thought he had lost the plot.