Hi,
Thanks for reaching out to Microsoft Q&A.
As per the official documentation, the usage detail API will be retired at some point in future. They haven't provided any specific date but put up generally. Hence, instead of this it is wise to use Cost Details API for all the development activities.
Please Upvote and Accept as answer if the reply was helpful, this will be benefitting the other community members who go through the same issue.