Created an autopilot and it doesn't respond

Actually, you could try to change it, and even add a Flight Director. See this snippet:

Then invoke it by binding AP Master Toggle to a key or a hardware control. I believe Z might be default to turn AP on.

Beyond that I couldn’t tell you the coding. This is just a well known cfg change going back several FS versions.