As documented at Workflow commands for GitHub Actions - GitHub Docs using the
::error:: prefix a generic tool can annotate a job/step in a workflow.
Notice, exactly the same functionality is being exercised by the
actions/toolkit - see toolkit/command.ts at 1cc56db0ff126f4d65aeb83798852e02a2c180c3 · actions/toolkit · GitHub
As in both cases
file/line properties are not required when rendered in the GitHub Actions UI they appear with job-name .github#L1 anchor that leads to nowhere (or I would say to a very wrong place) - for example see https://github.com/ivailop/play/actions/runs/472659124
I would be best if such annotations a linked to the job/step that generated them in the first place.