Differences between the same functions in Python and C++

Hello. I need to port Python algorithm to C++ and some of the operations (I’ve noticed GaussianBlur and Laplacian) give different results. Of course the inputs are identical images (otherwise why would I ask). I’ve managed to correct it in GaussianBlur by converting the input image from CV_8U to CV_64F, but Laplacian with 5x5 kernel and CV_64F required result is still stubborn.
Clearly the Python functions do something inside with their parameters that I don’t have in plain C++ passing. What is it and how can I repeat it in C++?

please do not duplicate topics here, thank you