Is there any way to remove the optional filter in lookup fields in lightning as we have in classic?
I think the people above have not well read your question. Indeed what you are asking is not supported in Lightning:
Admin-Defined Related and Dependent Lookup Filters Can’t Be Made Optional Once added, all lookup filters are required, even if admins specify them as optional in Setup. There’s no Show all results view for users. User-defined lookup filter fields aren’t supported.
There is no difference between clasic and lightning, since the field setup pages are still the same in lightning. Lookupfilters are serverside backend logic and not related to the Lightning Functionality.