I assume that you are referring to this endpoint.
Is there any solution to get all the user ids whoever retweeted?
Yes there is, but you will have to use a Premium or Enterprise API. You can either use the retweets_of: operator and in your system, filter for just those Retweets that are associated with the Tweet in question. You can also use the "phrase match" operator with the full original Tweet text and use the is:retweet operator to filter for just operators.
In both cases, you will have to look for the proper user ID within the Tweet payload that you receive.
I suggest you use either the Premium or Enterprise Search product if you go this route.
I don’t have a good answer to your question on how we choose which IDs to deliver via that endpoint. I’ll see if I can find someone that does.