I sort of replicated this, and noticed from the pitch listings that the start point of defined pitch differed a little bit: 15.552548 sec vs. 15.551652, therefore the F0 value also differed a little (148.186206 vs. 148.921995). This suggests that "times" are not exactly preserved (which it could be if Praat kept track of sample number as an integer and computed time as a function of sample rate). In the editor, you can take textgrids out of the picture and just manually select start and end – the reported time of the first defined pitch value will differ by a tiny amount depending on the "exact" time of the selection. Reading this and this, about the pitch tracking algorithm, may explain the underlying theory of F0 extraction and how the output value depends on a "window". I also believe that a quest for "absolute accuracy" is doomed, and you have to accept values that are "good enough".
You don't say whether this is an editor script or a object menu script, but it should be an object menu script. Praat interpolates values between computed pitch frames which is why you can request a pitch value at a very exact time that lands between two computed pitch values. If you don't like the small variation that results from this, you should use frame numbers and extract by frame. Likewise, you may specify a seemingly precise time of a sample, but there isn't necessarily an actual sample there. You can determine an integral sample number based on desired time (as reflected in your earlier cursor click), then convert sample number to floating-point time.
Also remember that you can control the time step of pitch analysis so that you can get the desired time granularity
The best way to get exactly the same pitch values, which is to use the entire un-extracted file, create a pitch object with To Pitch (ac) filling in exactly the same parameters each time (in a script), then get F0 based on frames via List values in all frames: "Hertz" or "Get value in frame". In either case you have to work out the relationship between time and frame using Get frame number from time. The time step value determines how often Praat computes a pitch value. When you ask for a time that is between two actual measurements, it interpolates the answer.
Praat requires a broad window for pitch extraction, therefore if you want to get pitch between 1.2355267841 seconds and 1.8544353569767, you cannot extract just the interval from 1.2355267841 seconds and 1.8544353569767, you have to start further left and go further right, in order for Praat to "pick up the pattern" in the part of interest. This paper explains some of the technical why.