fmt.Scanln() can return an error. If you check that error when inputting 123 456, you'll see it returns expected newline. If you check the documentation for fmt.Scan(), you'll see it actually reads multiple successive space-separated values.
So, what's happening here is Scanln finds your first value (123), then sees a space, which would cause it to scan a second value. However, you've only passed in one pointer, so it's expecting a newline rather than a space. It'll keep reading, trying to find a newline, but once it hits a character that's neither a space nor a newline, it returns an error. Because of that, it's consumed the 4 in 456 in its attempt to find a newline, and the next call to Scanln will no longer have access to that 4.
Your use case would likely be better served by bufio.Scanner or bufio.Reader.