Usually WhatsApp files are all in the iOS backup. However, app developers have the option to turn off files from their app being backed up or not.
WhatsApp recently made it so that if you turn on their end-to-end encrypted backup to iCloud or Google Drive, the WhatsApp data is not included in the regular iPhone backups.
Below is a screenshot from by own iPhone showing the WhatsApp settings for turning on end-to-end encrypted backups. The screenshot shows that the WhatsApp data will no longer be in the iPhone backup if end-to-end encrypted backups are turned on.
If you want the WhatsApp data in your iPhone backup, WhatsApp's end to end encrypted backup has to be turned off before a new backup is made.