When you hide the parts of an assembly in a drawing, the "frame" of the view updates automatically. (Edit: and when you hide the body of a room as well!)
But there's one detail that may explain your inconvenience: annotations or sketch entities may be linked to this view, without you intending to. This can usually be seen by grasping the frame of the view and moving it. If other elements are moving at the same time, they are linked to this view.
Thank you Bart, I didn't think of trimming the view, the idea is good and I would apply this method.
Benoit, yes the problem of annotations and lines has already happened to me, but here it's not the case, and indeed normally the window is set to the right size automatically but it doesn't work all the time.
Stefbeno, I don't have this tab below the "default" tab , how can I get it?
Is your drawing of an assembly or a part? If it's an assembly, it's normal that you don't have the "Body Selection" button. If it's a room, it's not normal.
Oh okay, I work well on an assembly, normally I work with a multi-body part in mechanically welded but some parts had to be bolted and then it was decided to weld them, so I am forced to work on an assembly.