Voltage across charging capacitor drops after some time
A case of comments graduating to become an answer: -


Maybe it's an old leaky electrolytic capacitor?


  That may very well be the problem, I just switched out the capacitor
  for another one and it seems to behave correctly this time! I should
  have tried that earlier.. Thanks a lot for the help!