Are you doing this in a smart collection? Are you doing this with a filter turned on?
The file hasn't "disappeared from the library", it's just not in the current view (and probably can be found if you click on "All Photographs" and turn off all filters)
If you turn "Capslock" off you won't have to move back to the image. You can assign a star and color without the selection moving. As far as the photo disappearing, DJ is correct that you probably have a filter turned on or are working in a smart collection BTW, I like your forum name, I shot many rolls of Kodachrome 25 and 64.
HI dj, Iam using smart filters and I am working from All photographs,
filters are turned off. Thanks, Brian