Can't /item replace with item_name

I'm trying to do the following: execute at @e[type=item,name="Phantom Membrane"] run item replace entity @p[tag=Ranger] hotbar.0 with minecraft:phantom_membrane[item_name="Track"] and it works on the command block itself but once I type it on the datapack it complains about the item_name part, the error is: Expected “"” Trailing data encountered both refering to the collum where "Track" is
Continue to help post