I think this is an indentation problem, make sure the code block is indented at the right level for the footnote. I don’t think footnotes were meant to store code blocks as such, in edit mode they indeed don’t render as they would normally.
test [^1]
[^1]:
```python
print("test")
```