First you need the actual fastboot, e.g. 1.4.3 (from link in the other answer).
Then the correct command is:
In the help (fastboot help) you can read in fastboot version 28.0.3:
--slot <slot> Specify slot name to be used if the
device supports slots. All operations
on partitions that support slots will
be done on the slot specified.
'all' can be given to refer to all
slots.'other' can be given to refer to
a non-current slot. If this flag is not
used, slotted partitions will default
to the current active slot.
-a, --set-active[=<slot>] Sets the active slot. If no slot is
provided, this will default to the
value given by --slot. If slots are
not supported, this does nothing.
This will run after all non-reboot