How to stop Line Renderer from drawing over UI?

I’ve tried setting different layers for my gameobjects and I’ve already attached the script which contains the line renderer to a specific panel on the screen, but nothing works. The line renderer keeps drawing over everything on screen.
I want to limit the drawing ability to that and only that specific panel.

I’m sure there must be a way to do it as keyboard apps seem to have this figured out, but how?

Thank you.

Did you try:

  1. setting the render queue of your line renderer?
  2. use a different camera just to render the UI ?
  3. Use a custom shader for UI to overlap everything?

Hey. how you solved your issue? @Emanuel19861