There is a pixi lock --check command. https://pixi.sh/latest/reference/cli/pixi/lock/#options
pixi lock --check
--check Check if any changes have been made to the lock file. If yes, exit with a non-zero code
--check
Check if any changes have been made to the lock file. If yes, exit with a non-zero code