Sounds like a bad stylus. Do you have another one you can try? Does the tablet respond immediately to your finger right after the stylus fails? If it does, then the stylus is bad. These things are capacitive/conductive in nature so it might be the coating or the connection between the tip and the body of the stylus is bad... the stylus still needs your body to work.
I really hate to think it's a screen problem. I'm stumped that the screen works fine with your finger but not your stylus... it uses the same detection layer. I also can't imagine what might be causing the stylus to fail, then work after a restart. Some devices have a sensitivity control where you can increase the sensitivity of the screen. My Note 4 has this setting, but my Note 10.1 2014 tablet doesn't. You might check your settings to see if you have this option.
I'm guessing it happens no matter the app you're using, or only when navigating the launcher itself? Are you using a 3rd party launcher? I guess if it's happening in apps too, then it wouldn't be a launcher problem.
The only other thing I can think of (besides the pen or your body) is if an app you've installed is causing this. I don't know how, so like everything else, its just a guess. Perhaps you can try starting your tablet in Safe mode to see if the problem still occurs. Safe mode will disable 3rd party apps. I've also heard bluelight filters have caused strange behavior on devices, so if you have a bluelight app running, you might try uninstalling it for a while.
There are other things... like disassembling the tablet and re-seating the screen/digitizer cables, but I'm not sure you'd want to go that far. Those connector locks are delicate and if you're not very careful, you can break them... and mess up your tablet even more.
When the problem occurs, it's in all apps, the home screen, menus and app drawer; everything. I use the stock launcher. No blue light filter. I'll double check for sensitivity settings, but can't recall seeing these.
One of the last options I would ever recommend is a full factory reset, but that's a drastic move leaving you to completely setup everything all over again. Big PITA! I can't even say it would help in this case. Of course, you need to back up all your data first if you're going to try that. Hopefully, safe mode might be able to uncover something if its an app involved.