You can use
_input() so it does not propagate and does not the funciton intended on the line edit.. for example:
if event.is_action_pressed("ui_up") and $LineEdit.has_focus():
That script is set on a main scene that hase LineEdit as child. If you press up arrow when focusing the LineEdit, it will print "up" and exit, and wont do the effect expected on the LineEdit.