Currently field accessors are always created (unless the #[disable_initialized_field_access] option is given to the initializer). An alternative would be to scan the body of the initializer and check if it uses the fields. If it doesn't then do not generate an accessor.
Suggested by @nbdd0121 (https://lore.kernel.org/all/[email protected]).