Im gonna go out on a limb here and say you have Following Pokemon below the Dynamax script. Try moving Dynamax below it instead.
I moved the Following Pokemon under the Dynamax script and I still get get this message
Message: Script error within event 11, map 3 (RED's house):
Exception: NoMethodError
Message: Section176:1593:in `dispose'undefined method `dispose' for nil:NilClass
***Full script:
pbWildBattle(PBSpecies::PIKACHU,5)
Interpreter:243:in `pbExecuteScript'
SpriteWindow:1152:in `pbDisposeSprite'
SpriteWindow:1141:in `pbDisposeSpriteHash'
SpriteWindow:1140:in `each'
SpriteWindow:1140:in `pbDisposeSpriteHash'
PokeBattle_Scene:1607:in `pbDisposeSprites'
PokeBattle_Scene:2148:in `follow_pbEndBattle'
Following Pokemon:1487:in `pbEndBattle'
PokeBattle_Battle:4438:in `new_pbEndOfBattle'
Dynamax/Gigantamax Script:2276:in `pbEndOfBattle'
Interpreter:276:in `pbExecuteScript'
Interpreter:1606:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `follow_update'
Scene_Map:101:in `loop'
Scene_Map:114:in `follow_update'
Following Pokemon:1552:in `update