What is the purpose of trying to underline a space? Why not just type the Underscore character instead? Or -- better yet if more than a single space -- use a Tab with an Underscore Leader?
Peter is correct about the Compatibility preference, but that's a 'throwback' to the days of fixed width characters. The default for Word documents is to not underline spaces because the space bar is intended to generate white space. By definition a
space is exactly that -- an interval containing no displayable/printable characters.
Since the introduction of Proportionally Spaced Fonts on personal computers, use of the space bar for anything other than a standard space between words or between sentences generally is not accepted practice. The amount of space allocated with each press of
the bar can differ depending on a number of variables & cause inconsistency as well as other formatting/layout issues... especially if stringing together several consecutive presses of the bar.