How can I make Blender to exit with the same exit code as the python expression?
You will have to put the expr in try and explicitly exit with an error code on exception.

E.g. following exits with exit code 10 (user defined):

"\Program Files\blender foundation\blender\blender.exe" --background --python-expr "exec('import sys\ntry: 2/0\nexcept: sys.exit(10)')"