You can’t remove the extension lines without removing the connection of the dimension to the model or drawing. You could change the color of the extension lines to white so they don’t show or adjust the gaps so they are large enough but you may need to adjust the gaps differently for different dimensions.
You’ll note that changing the length of the extension lines leaves a mark at one end of the dimension line. You can see that in mihai’s animation and below. Changing the color of the extension lines to white leaves only the dimension arrow and dimension text as in the right, below.
Your profile says you are using SketchUp Make. Please update it to show the correct version.