you can see in this attachment.
The gray transparent box seen in the screenshot only identifies the perimeter in which all of the primitives of the selected component are contained within. That includes the pads, 3D body, silkscreen, assembly drawing info, etc. for the selected part. Everything except the reference designator. The box is always rectangular and just assists you in identifying the overall "size" of the component that you have selected. If the part is not selected, this box will not be visible.
However, your electrical clearance and component clearance (assuming the component has a 3D body defined) are not calculated or determined from this box at all (except in the missing 3D-body case mentioned below). For your electrical/copper clearance, the clearance is defined in the 'Electrical > Clearance' design rule set and only applies to primitives on copper layers (pads, vias, polygons, keepouts, etc.) For the component clearance (physical body clearance), the clearance is based on the 'Placement > Component Clearance' design rule set and applies specifically to the clearance between 3D Body layer content. However,
if you do not have any 3D body model information (simple or step) defined in the component footprint (typically on layer 13 & 16), the component clearance will be calculated from the gray transparent box shown in your screenshot. Do you have 3D bodies defined in the problematic footprints you created? If you add some basic 3D body information to the footprint, you can maximize the component density on the board and prevent those DRC component clearance errors. There are several other clearance rules (like silk to silk, silk to board edge, etc.) but the component clearance rule is likely the problem in your case.
Good luck.