It is caused by either of the following settings in the project being packaged as an IP:
Out-Of-Context. Ensure that there is no Out-Of-Context IP in the project before you package it.
Attributes Box Type in the RTL code. Box Type settings will prevent Vivado from synthesizing the module in a packaged IP as the top level design will consider it as a black box. As a result implementation will likely fail with a blackbox error or attached logic will be trimmed due to the missing component.
Also, please check if you are following this process.