Google for “ATmega32u4 fuses”
The fuses reserve a section for the bootloader. You can use Avrdude so set these. You also have to modify the entry in the boards.txt file in the IDE for your board or, better, create a copy and rename/modify that. Look for an entry similar to this :
leonardo.upload.maximum_size=28672