At beforeInsert time, the sobject's OwnerId field is always populated in Trigger.new. Thus, you need to change your code to test for OwnerID = The default lead owner (see
Setup | Lead Settings and change the OwnerId accordingly. The default lead owner is used for W2L.
Unfortunately, LeadSettings is not available in the Metadata API (V46) as it is an unsupported type so you can't really robustify your code to be tolerant of any settings value.
The workaround hacks are discussed here in this SFSE Q&A. As such, for coding and testing, you may need to use custom settings, custom metadata, or custom labels to maintain an unsync'ed copy of the default lead owner
A better workaround is to use LeadSource='Web' as your clue that it is a W2L (or some other field you set ONLY on your W2L form.