Pgh Ultramatic gives good advice in the procedure on adjusting the neutral safety switch but just to reinforce his comments, there is very little to no margin available in the switch to have it be properly adjusted and active in it's positions at both ends. If the linkage is loose or worn or if something mechanical such as a blockage in a rod or lever or something like hardened grease at the bottom of the column is preventing the shift tube from going full travel at the reverse end, you may seemingly get it to work correctly once or twice only to have it fail the third time. Before spending a great deal of time trying to adjust the switch, as others said, make sure the linkage is working smoothly and all connection points are in as good a condition as possible.
Dirt and hardened grease in the opening toward the bottom of the column where the lever exits to connect with the first or vertical rod has been an issue for some in preventing smooth and complete rotation of the column shift tube.