As long as you’re playing at a legit and licensed site it’s completely safe. They’re required to have a high level of security and only a very few people (those working with risk analysis) will have access to your ID.