This problem can occur if you create key and time signatures by clicking with the mouse when you have nothing selected. It’s certainly not obvious what you should do from the way the program looks, but if you want to create a key or time signature with the mouse, I strongly recommend that you first select the note before which you want the key or time signature to appear, then click the desired item in the right-hand panel. This will ensure that the object is created at the correct position.
Alternatively, if you want to create them completely with the mouse, without first making a selection, then you need to click on the note before which the key or time signature should appear, not in the gap to the left of the note, which Dorico will interpret as you wanting to create the item at that rhythmic position, i.e. an arbitrary value before the note at which you actually want the item to take effect.
This is obviously not ideal behaviour and we plan to do something about it, but this is how the program behaves right now, so hopefully knowing that will allow you to work within the program’s current behaviours in a smoother way.