How to move the blue borders?

Can I move left and right blue borders closer to the dimension so that the borders don’t block the view of the dimension lines?

Yes but you have to explode the dimension to do so. If you were going to do that, though, it would be easier to use Arrange and send the text box behind the extension lines. Keep in mind that exploding the dimension will result in it not behaving as a dimension anymore.

it’s a pity that this can’t be done without breaking this function

The font and its size are primarily responsible for setting the padding around the text. You could utilize the leader feature for short dimensions.