Low-level formats of floppies do not do individual sector writes, as
normally done when writing new data to a sector of an
already-formatted floppy, but instead rewrite each entire track in one
operation. This is done in such a way that the entire track, including
unused areas, is overwritten, ensuring that there will be no data left
from previous formats.
The data sheet for the Fujitsu MB8877A Floppy Disk
Formatter/Controller (FDC) explains this fairly clearly.
Page 8 contains the details of track formatting, including the gaps
between sectors:

Further down on the page are the exact details of byte values and
counts; for our purposes all that's really important is that all of
the gaps in an MFM ("double-density") format are a continuous stream
of $4E values.
Page 10 gives the details of what data to feed to the FDC during a "write
track" command in order to format a track:

What happens during this sequence is that you seek the head to the
track you want to format, send a "write track" command, and write $4E
to the data register (DR), indicating that you want the controller to
write a post-index gap byte when it starts writing. This will clear
the data request bit (DRQ) in the status register.
The controller will wait until it's detected the index mark (via the
small hole near the centre of the diskette passing an optical sensor)
and then start writing that byte. In the meantime you must be checking
the DRQ bit; when it becomes set you must write another $4E to the DR,
doing this 80 more times. This creates the post-index gap. You then
carry on writing the other bytes described in the table above until
you've written address markers, data fields and gaps for all of the
sectors.
At this point there's still a gap of variable size to be written. (The
size varies due to small variations in the speed of the motor.)
To fill this out completely you continue to
write $4E filler bytes as above until the controller sets its INTRQ
line, which indicates that it's again seen the index hole and you are
now writing again over the post-index gap you wrote at the start of
the track format operation. This ensures that all data previously on
the track have been overwritten. A little bit of "overflow" here does
no harm because it's merely writing into the unused space of the
post-index gap.