Thanks for your suggestions! I completely forgot about this issue, but I just tested this for future reference and it turns out that $post object isn’t available yet when registering ACF Blocks using acf/init action (as suggested in the acf_register_block_type documentation). So it’s probably better to just put the data in data-attributes in the template/render_callback and read them from there, or pass them some other way, especially if it’s just a few parameters.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users