It's intentionally written to prevent this sort of use, for good reason. It's possible someone could find ways around it by parsing RAW very carefully, but as a DM I would probably rule against it, because it would likely create a broken situation and is likely players trying to metagame and pull off shenanigans. Have to see the context, though.Okay, a Wizard casts Wall of Force to defend himself from attack, creating a dome over his location. What spells from the published materials can he use against an enemy located outside of the dome? I just need a solid list of standard options.
The sacred flame exception would be very hard to pull off and not very powerful, so that would be okay. Maybe a multi-class cleric 10/Wizard 9/10 could get away with a Divine Intervention while in the force dome, and the deity could attack the target? If they could make that roll, I'd let 'em have it!