Please format your code using 3x` such that it is possible to copy-paste the code to an editor and run it without modifications.
Please also note that your VonMises stresses should be projected into a DG 0 space, as the displacement lives in CG 1. This has also been noted in other questions such as: