I don’t think its a code issue, but a specification issue. Plans rarely specify what dedicated means, so I use my judgment.

I go by 4 levels of circuits, each with increasing costs:
1. General - shared power, neutral, and ground
2. Dedicated - its own power, but shared neutral and ground (usually for a coffee pot or something like that)
3. Dedicated w/ own neutral - own power, neutral, but shared ground (I use this on alarms, phone equipment when IG isn’t spec’ed).
4. IG - own power, neutral and ground.