The fix that worked for me:
1) Return to design view. Copy paste a random element. Delete it.
2) Go back to code view. Try copy pasting. It should work.
EDIT: This bug happened to me once again, don't know the cause. But the above fix no longer worked. (March 23,2019)
Things that didn't work:
Just closing and reopening the same file in app designer
Restarting App Designer only (not restarting matlab) and then opening up the file again.
I think there is some issue with how App Designer switches between the two clipboards (that Melissa mentions below) when you change views. Will update this answer if I find the steps to reproduce the issue.