Let's start with the bottom line.
How do you deal with this?
This is your first semester teaching the course. Forget analyzing attendance statistics - you should spend your time differently:
- Put effort into preparing your classes (actually that's kind of a must)
- If you haven't already, do some reading and/or watch videos on presentation skills
- Get feedback from other teachers / teaching assistants - even asking one or two of them to sit in on a class, take notes and give you pointers
- A bit tricky, but - think of a way to get feedback from students - without turning your class into a discussion panel about the class itself. For example, if there is a web forum or Facebook page where students discuss the class, read some of it (and absolutely do not post anything).
To my surprise, out of the initial batch (<50), 25% never showed up and another 12.5% ended up dropping the class.
Why are you surprised? If people can relatively freely drop registered classes, they might over-register to begin with and only make the decision what to go to on the first day, or later. They don't know / don't care that "over-subscription" to classes bothers anybody.
I pour my heart and soul into making the class as well as I can (even if it's the first time I teach it), but am very worried about this number.
Those two things are actually quite orthogonal. Certainly the people who never showed up in the first place have not made any judgment regarding the quality of your classes. And as for the 12.5% - you can't know whether they disliked you as a teacher, or decided the course is not right for them, or any other reason.
Does such a dropout rate generally mean that I am indeed failing the students in some way or is this something that happens quite frequently?
Given only the information you've provided - you're not failing the students in any way.