so issue number 1 is very common, and not really an issue per-say. essentially the motor and geartrain still has momentum when the cutoff lever trips and will roll round until stopped. it's basically free precocking, as all precocking does is intentionally run the motor a little longer so it stops near the end of travel. a mosfet with active braking will remedy this (although sometimes can go too far and stop the system too quickly giving lockups on semi), a better solution would be a mosfet with precocking which will let you intentionally control where the box stops.
issue number 2 i'd say is happening because you're testing it outside of the reciever (going by the picture), assuming this is going to an ar derivative (the sr-15 in your profile) then when you put the gearbox into the reciever and bolt on the buffer tube/stock, the bolt that threads into the back of the box will go into the spring guide and hold it tight to the back of the box, stopping it from tilting.