git fetch fetches information on remote branches, but does not make any changes to your local master branch. Because of this, master and origin/master are still diverged. You’d have to merge them by using git pull.
When you make a commit, your local master branch is ahead of origin/master until you push those changes. This case is the opposite, where the origin/master branch is ahead of your local master branch. This is why you are getting different outcomes.
Read https://stackoverflow.com/a/7104747/2961170 for more information.
Using git merge origin/master refers to the master branch on the server. git merge master refers to your local master branch.
By using git pull you can merge them if they diverge.