This statement refers to The Tragedy of Hamlet, written by William Shakespeare between 1599 and 1601.
The presented excerpt is a false statement. When Claudius leaves the play some characters do stay on stage with Hamlet even after Claudius had already left.