Yes, this is a known issue. Here's what's happening: the server has an idle connection time-out setting. By default it's 15 minutes, I think. Any time that connection has no traffic for more than that time period, the server closes it. On the client, it will show as disconnected, but due to the persistent mapping, Windows still knows about it, so it shows up in your drives list. If you double-click or open it in some way, it re-establishes a connection, and all is well.
The problem is that your application doesn't know that. It wants a connected drive, and when it can't find one, it fails to do whatever it is it's supposed to do.
So, two possible solutions: one is that you can adjust the idle connection timeout on the server so that connections aren't dropped overnight. You can do that from a command line, but MS recommends editing the registry. The key is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters
There's an autodisconnect value there; probably set to f (it's a hexadecimal value). Change that to ffffffff, which is 65,535 minutes. Sessions then won't expire overnight.
Alternate solution is on the client end. Persistent mapped drives (mapped with the 'reconnect at logon' option) maintain mappings, but not connections. So when you startup in the morning, it just keeps track of "hey, there's a drive on server whatever that we're calling M:" - it doesn't actually connect to the server at that point.
Your option here is not to use persistent mappings, but to do 'net use m: server\share /persistent:no' instead. Probably in a login script, if you use those. That way, the share is not only mapped, but a connection is opened, and would be availble for your app to use.
Either way should work. The auto-disconnect on the server is probably easier, but the net use is a little more foolproof, as the auto-disconnect timer will be reset if the server ever reboots, meaning your connections will probably fail first time afterwards. . .