Module cannot see defines defined in pkg, if this pkg is imported inside module. What is the reason for it?

In reply to EleneSajaia:

FYI, this example helps show that compiler directives get pre-processed as a distinct step before SystemVerilog compilation.

package pkg_A;
 
`define DATA "hello"
 
endpackage

package pkg_B;
 
`define DATA "world"
 
endpackage


module tb_top;
  
import pkg_A::*;
  
  initial $display(`DATA);
 

endmodule