As we can see in the documentation here on Screen.SetResolution
:
A width by height resolution will be used. If no matching resolution is supported, the closest one will be used.
So what it will do is downgrade that to a supported width/height. This applies even if it's in windowed mode as opposed to full screen (at least in the version I'm using: 4.5.2). It should, however, work just fine as long as the monitor you're using supports that resolution.
The code used to programmatically change resolution is:
Screen.SetResolution(4096, 786, false);
Note also that on the build settings you can disable the resolution dialog that pops up before your game runs and you can define the aspect ratios and such that your game supports AND that resolution functions like this will usually have limited/no effect if running within the editor.