To reproduce open a non empty file (like the above .vimrc) and type inside of brackets until YCM opens the completion list and press enter twice. Compare that to pressing enter twice after typing a single character (so YCM does not offer suggestions):
I don't know what could be going on. I'm sorry I can't more useful but I don't use YCM and I'm not starting now. If you find a fix to this feel free to reopen the issue.
Here's the minimal .vimrc I tested it with:
To reproduce open a non empty file (like the above .vimrc) and type inside of brackets until YCM opens the completion list and press enter twice. Compare that to pressing enter twice after typing a single character (so YCM does not offer suggestions):
vs.
Pipes are cursors.