I just looked at it closely now, and typst/typst#5741 causing Codly to go into page/column margins by stroke.thickness / 2. Similar to how I solved typst/typst#4416 (comment), for Codly I tried adding #show raw.where(block: true): pad.with(1pt / 2), and it worked as expected.
Since you can't get default values, can this be included in the package natively? It's necessary until typst/typst#5741 is added. I'm not sure if some hacky show rules will be broken, if they were looking for raw and instead will find pad.