"ai_agent" config entity does not handle dependencies well
## Problem/motivation
On saving a new or an existing AI Agent config entity at /admin/config/ai/agents - the module dependencies are not resolved properly. Exporting the config results into empty `dependencies`
This becomes challenging when there tools used by the agents that might come from another module and the module is not present or is later uninstalled.
## Steps to reproduce
1. Install the `tool_belt` module. Also install the `tool_belt_content` sub-module.
2. Create a new agent or edit an existing agent at /admin/config/ai/agents
3. Try adding a a tool provided by the `tool_belt_content` module (say `entity_save`)
4. Save.
5. Try to export the config.
**Expected result** You should see `tool_belt_content` and `tool_ai_connector` as module dependencies on the config entity.
**Actual result** The `dependencies` is an empty array.
issue