Britain doesn't even invade if they are only at war with Denmark?!?! Could this be a bug?
The ai will do exactly what it is told to do.
So somewhere in the main eng ai file is a command to attack morocco or from earlier Wilmshaven.
It may even have a command to ignore Denmark.
I have no dh files here, so I cannot look myself.
Please check over the main eng ai file and look for Denmark or Morocco province IDs.
if you wish, maybe put back to Kaiserreich main eng ai file, look for wilmshaven or morocco province IDs there, if found, copy them to you switch ai file, cancel the attack or invade commands for these provinces.
What I trying to get across is that the ai will do exactly what is in the main country ai file that is loaded at game start.
From there the modder changes some parts of that file selectively and temporarily gets the country to do other things.
After those things are done, he then reloads the main country ai file, or on year change, the game will do that anyway.
If you AI is invading or attacking somewhere, that command must be in the file somewhere.
Sorry I cannot look myself, I do not have dh on my pc, it does not work for me with windows 10 and an AMD gpu. ...