Ghost timestmap after deletion

Hola,
for some context:

I run a influxdb (InfluxDB v2.7.12 (git: ec9dcde5d6) build_date: 2025-05-20T22:48:39Z) in a docker container and with the db engine and data path mounted in a volume. The data path is also mounted in a second container which every so often checks the size of the volume and if it exceeds the space constraint deletes the data starting with the oldest timestamp, queries the oldest data point following way:

        from(bucket: ")" +
                       bucket_name + R"(")
            |> range(start: time(v:"2025-01-01"), stop: now())
            |> first()
            |> keep(columns: ["_time"])
            |> sort(columns: ["_time"])
            |> map(fn: (r) => ({ r with _value: int(v:r._time) }))
            |> first()


The problem now is that after at most a few deletions, but often pretty quick a timestamp appears which even after deletion (using the v2 api) remains unchanged. Here I delete from 1970 until oldest timestamp + range of time to delete, so there shouldn’t be anything left before the target end range. This ghost timestamp even remains after the shard duration has passed.

I run all inflluxd inspect commands not yielding anything interesting, I also run influxd inspect build-tsi as one other thread recommends, also yielding no difference.

Running the query like this instead

from(bucket: "bucket")
|> range(start: time(v:"2025-01-01"), stop: time(v:"2025-10-10"))
|> first() 
|> map(fn: (r) => ({ r with _value: string(v:r._value) })) 
|> keep(columns: ["_time","_value","_field","_measurement"]) 
|> sort(columns: ["_time"]) 
|> map(fn: (r) => ({ r with _value: int(v:r._time) })) 
|> first()

does not return the ghost timestamp.

Any idea why the first query returns the ghost?