@Test
    public void parseFromCursorPositionBeginTransaction() throws DBException {
        String[] dialects = new String[] {POSTGRESQL_DIALECT_NAME, SQLSERVER_DIALECT_NAME};
        String query = """
            begi<-|n transaction;<-|
            select 1 from dual;
            """;
        SQLScriptElement element;
        SQLParserContext context;

        var modifiedQueryAndPositions = SQLEditorTestUtil.getCursorPositions(query);

        for (var entry : modifiedQueryAndPositions.entrySet()) {
            String modifiedQuery = entry.getKey();
            int[] positions = entry.getValue();

            for (String dialect : dialects) {
                context = createParserContext(setDialect(dialect), modifiedQuery);
                for (int pos : positions) {
                    element = SQLScriptParser.parseQuery(
                        context, 0, modifiedQuery.length(), pos, false, false
                    );
                    assertEquals("begin transaction", element.getText());
                }
            }
        }
    }
Check that QStringRule doesn't interfere in this case
See #19319
test/org.jkiss.dbeaver.test.platform/src/org/jkiss/dbeaver/model/sql/parser/SQLScriptParserTest.java