I would strongly suggest that you simplify your problem to a minimal code, following the examples in:
A general issue I see with your current approach is that you use compute_vertex_values()
As your function is not a CG 1 function, but a CG2 function, you should use ud.vector().get_local()
to get the array of all degrees of freedom.
In general, I would suggest using a function assigner (Usage of FunctionAssigner - #2 by dokken) to assign the noise to the mixed solution.
As a last advice, note that you are not using a P2-P1 pair, but a P2-P2 pair: