As my understanding, Prometheus use pull method to collect metrics from Prometheus exporter and I assume that Grafana also just can pull the Prometheus exporter itself by registering Prometheus type data source the same as Prometheus Server.
However, you seem to be saying that I should set data source URL as Prometheus Server itself.
I did try but It seems to scrape only prometheus(localhost:9090) endpoint metrics but node_exporter(node_exporter:9100) endpoint (Please refer the below Prometheus config), is it right?