Do you always want a Backpack in Minecraft? This Datapacks adds a Chest which works like a Dog.
If you don't want, that to PetBag follows you anymore, you can sneak on it. To make it following you again, you need to sneak on it again.
Drop these Items on the same Place
To remove all PetBags you need to execute the Command above again. After this you need to do the Setup exept of the first Point again.