I believe Claudius doesn't want Hamlet to leave because he wants to keep an eye on him. Claudius knows that Hamlet is the rightful heir to the throne, so maybe he is afraid that Hamlet will start a coup to overthrow him and take what is his. He also knows that Hamlet is growing crazier and crazier by the day so he doesn't know what he is capable of.