Use the approach explained in the second comment of post State Machine but instead of setting "Placement" to "Internal: Center" use e.g. "Internal: Top" and/or "Internal: Bottom" with appropriate "Distance" values.
The separator line runs across the entity due to value "Fit Node Width" of property "Size".
Corresponding GraphML.