Google has updated its search developer canonical documentation to specify that you should not set specify a fragment URL as canonical. Google added that bullet point to the best practices section of the document.
The bullet point added was, "Don't specify a fragment URL as canonical, as Google generally doesn't support fragment URLs."
I mean, this should be obvious for most SEOs by now but I guess Google wanted to make it clearer.
Here is the line that was added:
Nice find by Dave Smart who posted about it on LinkedIn. Dave Smart wrote, "An edge case for sure, but good to know!"
Forum discussion at LinkedIn.