Chosen Solution

Will the face unlock function of pixel 4 fail after replacing the motherboard?

The motherboard or mainboard will contain all of the configuration of the phone, it will be very likely that if the board is replaced correctly it will behave like a new (out of the box) device and not have any of your configuration, like face ID. Be sure to backup if you can before swapping parts.

I replaced the camera here and lost faceid