I don’t know what you mean by “share midi ports at the level of GP”. Most MIDI drivers (and ASIO drivers for that matter) do not support multiple clients on Windows so if you open a port from one application, you can’t open that same port simultaneously from another application. There are a few (probably counted on one hand) multi-client drivers out there, notably the one from RME.
The restriction is getting addressed in a new implementation under Windows 10 but is not yet widespread. In the meantime (until we can implement a way to not open all ports), proxyMIDI or loopMIDI supposedly lets you share ports so it may be worth looking at them.