My reading of your situation is that you have two, unrelated, problems and I would suggest that you resolve each separately.
1. Removal of DMF from the rxn mixture---I'm assuming, from phthalimide, that your desired product + major byproduct are both insoluble in water. Therefore, quench the rxn with crushed ice-water, (DMF slowly into excess ice/water or vice versa). Filter the ppt, wash well with several aliquots of water, dry.
2. Use tlc on silica gel plates to perform scouting expts; determine a mobile phase, that after 3-4 developments sequentially will give adequate resolution of product/byproduct.
Suppose EtOAc (100%) gives Rf ~0.9 with no resolution & Hexane (100%) gives Rf ~0.01.
Start with EtOAc/Hex 1:4 v/v, run the plate 3x, with thorough drying of the plate after each run.
Adjust EtOAc/Hex ratio to optimize the tlc separation,with Rf ~0.4-0.7 for the two products.
This will give you an idea of the likely behavior on a column. Separate by dry-column chromatography.