I don't know of a phrase where someone can so generically point out a flaw. In your example, I'd say human - nobody is perfect. Perhaps his weakness or limitation would fit here.
There are words for dramatic flaws.
An Achilles heel: a portion, spot, area, or the like, that is especially or solely vulnerable. It does not need to lead to his downfall; it connotes someone who is pretty damned perfect except for this one thing. "Tom Cruise has an Achilles heel" would be understood that way.
His Achilles heel is his quick temper.
Shortcoming, or foible would be understood as an understatement; if he's crazy, that's a major problem; to call it a foible before stating the flaw would be mildly sarcastic.
A tragic flaw in drama is a failing of character in the hero (someone of high repute/honor/etc.) of a tragedy that brings about his downfall. Regarding Hamlet:
He has exceptional qualities like graceful personality and popularity among his country that is eminent. His tragic flaw is his delay in action and irresolution...
Other expressions for this are simply flawed, or inadequacy.
"Slacker" has the sense of someone who doesn't do work until compelled to (e.g. By the boss's presence). Where a "shirker" would like to avoid the work entirely, a slacker is perfectly capable of doing something but chooses not to at the moment. Here's one of the definitions from Urban Dictionary: "someone who is very lazy, doesn't do their work until the last minute, and frankly, enjoys it." This doesn't catch exactly what you want, but I don't think you'll find something more specific to the boss coming into the room.
Best Answer
The term for the phenomenon, when you perform better under observation, is Hawthorne effect:
I don't believe there is a succinct single word to define a person who is a slacker but pretends to work hard when the boss is watching. Sycophant and related adjectives come to mind but they are not specific enough.