[DependencyInjection] fix a regression introduced in #9807

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

As @stof pointed out in #9807 we always need to dump the fully qualified class name, to support dumping containers in a namespace.