The reason this is happening, is because you entered select mode.
When you click anywhere inside the window of a commandprompt (and not the titlebar) you start to make a selection. a white square will appear indicating your selection.
To cancel, right-click, which means: copy the selection to clipboard, and resume.
You can disable this functionality as follows:
On the command prompt window, click on the icon in the top left of the window (left of the title) to open the menu, and select Properties.
Go to the options tab, and disable Quick Edit Mode (first checkbox).
Hit ok and clicking will no longer make a selection, neither as dragging.
To make a selection now, right-click the window and select: 'select' to enter selection mode.
Quick edit mode is enabled by default in windows 10 from a certain build. I forgot which one though...