Set the gridPos of a panel in a dashboard script

Hello, Im trying to set the size and position on a panel in my dashboard but after I set the gridPos of my panel this values is overwriten and the panel is not shown as I want. Why this values is overwrtien?