After adding a new switch, the host connected to the new switch do not ping with the hosts in the original topology

Unfortunately, I have not used that particular P4 setup before, so I do not have specific advice on exactly what you might be missing. Someone else may read your question and be able to give that kind of advice.

I do, however, have general advice on troubleshooting these kinds of problems, which I have written about here: The host ping across switches is unreachable - #4 by andyfingerhut