My question is: I was going to decide on what subject to study at the university level. I once had this thought " What if while studying this subject I discover that Islam is not scientifically logical and I leave the religion" and based on this I began to become worried this might happen with me and I'll leave Islam. Is this an act of doubt which leads to kufr as i thought "what if I discover islam is not logical"?
Note: this wasn't merely waswas as I acted upon it by frowning and asking people if i should take the subject despite on my fears. It does not matter what I wanted to study. For reasons I cannot explain you can assume that it is something like physics or biology.