Hi Xavier,
The tutorial is based of
DOLFINx version: 0.4.2.0 based on GIT commit: b983596ace0842230a442e10e49ffd4f27c34419 of https://github.com/FEniCS/dolfinx/
You can either upgrade to the latest version or try to see the corresponding tutorial under a previous commit,
Most likely this should be
boundary_facets = numpy.flatnonzero(mesh.compute_boundary_facets(domain.topology))
but I’d have to run this on a previous version to check.