What is the difference between adding a custom property via the Object Data tab vs the Properties Shelf?
Custom properties are always associated with a data block they belong to.
The place you add them from determines which datablock they are associated with.

Adding custom properties through the Properties Window will make them associated with the datablock of the currently selected tab.

You can add properties to Objects, so selecting a different one make them "disappear", but you can also add them to Object Data so several instances of the object sharing that data will have the same property.

You can also add them to Materials or Scene, Textures, Particles, among others, regardless of the object they are applied to.

Likewise custom properties added through the Tool tab are associated with another type of datablock, in this case not dependent on selected object, but the current Workspace.
Workspaces are represented by the tabs at the top, an are themselves datablocks that can be linked to or appended, and can bear their own custom properties.