Self-knockout moves will fail in max raid battles so if the dynamax/gigantamax Pokemon uses explosion/self-destruct it will fail. Picture this scene:
you go into a max raid battle and the enemy is a Pokemon that knows explosion if it tried to use explosion it will not work. Explosion will also not work for the the people in the max raid battle. Explosion will also not work if a Pokemon with damp is on the field