This is by design when we configure custom body with one or more sections:
Unlike the header and the footer, body configuration only allows defining one or more sections and adding one or more columns into each of those sections.
In other words, we cannot add css styles under the Body section.
More information for your reference:
https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/list-form-configuration
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.