If its loosening, either the bearing and/or locknut are working loose, or the headset wasn't correctly assembled and is "settling" into a different position.
Try marking the bearing and locknut with a dab of something, so you can see if they've moved.
Maybe try adjusting with the bike upside down, so that the fork is held in the correct place by gravity.