When using a predicate with looking_at and type=interaction (see joined json), the test does not pass when a solid block is on the same block than the "root" of the entity (see pitcures).
This does not look like intended since the Targeted entity info of the F3 menu is working in every conditions.
Thank you for your report!
We're actually already tracking this issue in MC-226487, so this ticket is being resolved and linked as a duplicate.
However, that ticket has been resolved as working as intended, which means that this will not be fixed as it is not considered a bug.
Please be sure to use the search feature before creating a ticket to see if the issue has already been reported.
Quick Links:
📗 Tracker Guidelines – 🛠 Community Support – 📧 Mojang Support – 🔑 Account Support – ✍️ Feedback Discord – 💬 Mojira Discord