As it turned out this is most probably a feature not a bug at the end as stated as follows in the documentation (https://learn.microsoft.com/en-us/azure/digital-twins/concepts-query-language)
Timing: There may be a delay of up to 10 seconds before changes in your instance are reflected in queries. For example, if you complete an operation like creating or deleting twins with the DigitalTwins API, the result may not be immediately reflected in Query API requests. Waiting for a short period should be sufficient to resolve.