You’re not doing anything wrong here. In fact any code added within the 5000 to 9999 range should be automatically available within purchase invoices, hence why the checkbox does not appear.
I see however that many of these codes you have created are not available in purchase invoices as they should be. We later realised that these codes were dynamically created from a journal or trial balance import. There’s a small bug here that meant the appropriate flag was not getting applied. We are working on a fix for this today and within the next hour all the codes you created will be available to use within purchase invoices.