Since the Moto x4 utilizes A/B slots, you'll have to specify the slot for boot.
Instead of "fastboot flash boot boot.img", you'll need to specify "fastboot flash boot_a boot.img" and "fastbooth flash boot_b boot.img" and etc for other partitions.
It would be good practice to flash both the...