Tag Historian Disconnect - system.tag.queryTagHistory not returning data

We have an Ignition system running v7.9.4 with a MySQL Database. When we trend historical data using a tag pen on an easy chart, the chart data plots just fine. However, since the chart data export really saves interpolated data and doesn’t return the full historical data set for the time range on the chart, we built a custom data export feature using system.tag.queryTagHistory().

For most dates and tags, this function works as expected. However, for certain date ranges, the queryTagHistory() function returns an empty dataset from the tag historian, even though we know for a fact that historical data is available because we can plot it on a trend chart.

Has anyone experienced a similar issue before?