open IntelliJ settings and select Editor | Code Style | Java | Code Generation.
Select the Use external annotations checkbox.
and the annotation option will be enabled.
Intellij version used - 2024.2.3