{{ source(source_name, table_name) }} inside macro compiles to model

Problem -
{{ source(source_name, table_name) }} inside macro is compiling to model instead of actual table_name.

Flow -
model (table_x) → {{ config(materialized=‘incremental’, pre_hook = macro_a_fun() }}

code -

model_x.sql
{{ config(materialized='incremental', pre_hook = macro_a()}}
select  *  from {{ source('package_p', 'table_a') }}

Note - Here it compiles correctly to select * from public.table_a

{% macro macro_a() %}
        select  *  from {{ source('package_p', 'table_a') }}
       select  *  from {{ source('package_p', 'table_b') }}
       select  *  from {{ source('package_p', 'table_c') }}
{% endmacro %}

Problem - In above macro, it compiles incorrectly to e.g select * from "public.table_x". I want to compile it to “public.table_a”

x_core.yml

version: 2

sources:
  - name: package_p
    schema: public
    tables:
        - name: table_a
         description: "" 
        - name: table_b
         description: "" 
        - name: table_c
         description: ""