Maybe you have installed Zoom or some other application to resize windows, which has also the feature to move windows. If you are not sure, take a look at the Menu Bar or Activity Monitor (SHOW ALL PROCESSES > sort by PROCESS NAME) and attach .pdf (via Command + P) of the processes listed in Activity Monitor.