Close and re-open the document. That’ll shrink it again.
The reason is because when you compact the database, it’s also performing a vacuum database function and that writes to a WAL (write ahead log) file, which is within the document folder. When you close and re-open the document, that WAL file is deleted. So then the calculation will be accurate.