Created custom button for url hack in lightning and added on opportunity page layout. IF opportunity lookup field Account have value then it is working but if it not there then show blank. so i have added if condition but it is throwing weird error on UI showing random id and contact your system admin.
/lightning/o/Opportunity/new?defaultFieldValues=Name={!Opportunity.Name},
AccountId={! IF( ISBLANK( Opportunity.AccountId ) , '', Opportunity.AccountId ) }