Well what closes project A and opens project B? Geany does not do that, it simply adds the opened file to project A, switching projects has to be a workbench function, not a Geany one (remember we don't use and are not experts on your plugin :). Since its done by your plugin can't you control that?