This is an expected behaviour.
Workaround:
As a workaround, use esxcfg-advcfg to set the desired value.
1. Login to the ESX host,
2. Run the below command: esxcfg-advcfg -k number_of_switch netNumPortsets
Note: Change the number_of_switch to the number you want to set [0-128].
3. Reboot the system.