From what I can tell, this is an old joke that has been picked up and reported as fact. The earliest mentions I could find online were in newspapers in 1921, where it seems to have been published in many papers, generally in a column along with obvious jokes or interesting tit bits.
Here it is in The Tabor independent, November 03, 1921:
Here in the Audubon County journal, November 03, 1921:
Here it is in the Walker Lake bulletin, November 05, 1921:
And many others. Based on that search, it was nowhere at all before November 1921, and then suddenly everywhere; so either the story was made up then, or based on an event that happened then.
It looks like it was picked up by British papers the following month. The Wednesday 07 December 1921 edition of the Huddersfield Daily Examiner has it, noting the origin of the story as "a writer in an American journal". It's in the Friday 16 December 1921 edition of the Kirriemuir Observer and General Advertiser, the Friday 09 December 1921 edition of the Birmingham Daily Gazette, etc., and then several papers throughout the twenties, thirties, forties, fifties, sixties and even nineties!
It seems the story kept doing the round of newspapers for years afterwards; here it shows up in February 1940 in the Coulee City dispatch, though in a trimmed down version:
The Ely Miner actually printed both the original version in November 1921:
And the updated version in February 1940:
They could have referenced themselves rather than the Montreal Star!
All in all, we only ever hear that this quote was reported by an unnamed "editor". I think it's most likely that the witty story was made up by an American, hence the initial appearance in American newspapers; "Peter Out" and "Pan Out" are both American phrases in origin, coming from a miner's term for a vein of ore running out and a prospector's term for panning for gold. It was published within Barrie's lifetime, though, so perhaps that's evidence that he really did say it; in which case, we'd have to assume it was at a dinner party in London in 1921.