List heading of tagged section

Hello,

I use #tags to assign notes to projects. In project notes, I do something like that:

dataview
list from #my_project
sort "Last Modified"

or

query
tag:#my_project

to get a list of tagged notes. That works fine for notes, as the title reflects the content. However, when I take a note about a project in a daily note, I use a # Heading and put the #tag right below it. This results in query results like:

2023-08-28
2023-08-23               <-- heading in daily note
Exchange about project   <-- real note

Is there a possibility to get the corresponding section from a tag (using query or dataview or anything else)? I.e. the note (file) name, when it is at very top of a file, or the section when it is under a section?

Thanks a lot!