The problem was that the `Pen Tool` would not add keyframes when Auto Keying was enabled. This also fixes a crash that could happen when auto keying was enabled and no keyframe existed. Pull Request: https://projects.blender.org/blender/blender/pulls/146549