Go to Settings app.
Go to Personalization option on the left pane of Settings app.
Click on Taskbar option at the bottom of the Personalization page
Click Taskbar behaviors option in the Taskbar page
Under the Taskbar behaviors section, make sure Automatically hide the taskbar checkbox is checked. If not, then please click on it to enable it.
-------------------
You can also reset taskbar.
Type or copy and paste the following text in a Notepad file and save it as a BAT file:
REG DELETE HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop /F taskkill /f /im explorer.exe taskkill /f /im shellexperiencehost.exe del %localappdata%\Packages\Microsoft.Windows.ShellExperienceHost_cw5n1h2txyewy\TempState* /qstart explorer.exe
After you save the file, double click on it to run the program. It will automatically reset your taskbar’s settings to default.