I have an LLC with the registered office as my home address. If I work from home office on my LLC before and after my W2 job (unrelated, main source of income), can I deduct the mileage as a business expense?
NO ... Commuting miles are NOT deducible ever ... never have been never will.
Now if your business has a qualified home office (or a separate address) and you leave for business reasons then the miles could/may be deductible but NOT leaving for personal reasons like a waged job.
I think you need to do some reading and get educated ... mileage is the #1 audit spot on a return ...
IRS information on Self Employment….
Publication 334, Tax Guide for Small Business
Publication 535 Business Expenses
Home Office Expenses … Business Use of the Home
If you are self-employed and claim a home office in your primary residence, (and qualify to claim it it legally too), and your home is your registered business location, then mileage from your home to a business client and back to your home is deductible. However, problems can and will occur if you take unrelated "side trips" while traveling to/from a business client. So just don't do that and you'll be fine.
If the vehicle you're using is *not* 100% business use, then make absolutely certain that you keep trip logs of every single mile you put on that vehicle, making sure to separate out business miles from personal miles.
To get started correctly, write down the mileage on your vehicle on Jan 1st, or on the day your business is officially "open for business". Then start tracking from there. Put an alarm in your iPhone for new years eve as a reminder to write down the end of year mileage on your vehicle on Dec 31st.
To keep records straight, your end of year mileage on Dec 31st "MUST" match exactly your beginning of year mileage on Jan 1st, of the next year. If it does not and you get audited on this by the IRS, rest assured you will lose.
If you have location services turned on on your iPHone, one app that's really good for this is called MileIQ. You can check it out at https://apps.apple.com/us/app/mileiq-mileage-tracker-log/id578830929
It provides detailed documentation which can be a life saver in an audit.