When a fishing rod is in your off hand, pressing right click will not cause the rod to cast. The rod casts out a tiny bit, but I believe this is a visual glitch, as even when pressed against the wall, the fishing rod does not take damage from encountering blocks. Even if fishing rods are not intended to cast from your off hand, the rod casting a tiny bit needs to be patched.
Thank you for your report.
However, your ticket has been resolved as a duplicate.
This issue has been linked to the original bugreport: MC-83185. You can find or add further information on that report.
If you haven't, please search before reporting any bugs, as it's likely that one exists already.