John Muller from Google recently clarified an important aspect regarding URLs with "#" in them appearing in Google Search Console. He explained that these URLs are from on-page sitelinks and are not related to canonicalization.
Sitelinks are additional links displayed under the main URL in search results, leading to specific sections of the page. These sitelinks are counted separately in the performance report. When filtering by URL in Google Search Console, you will see these sitelinks listed there. However, when examining queries, these URLs are combined with other pages from the same site, which is typical behavior when multiple URLs from the same site appear in search results.
For those looking to understand how URLs are tracked in the performance report, Google provides a helpful resource titled "What are impressions, position, and clicks?" This page offers detailed information on the tracking process and how different metrics are calculated.